corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [13/83] [abbrv] [partial] incubator-corinthia git commit: removed SDL2
Date Mon, 23 Mar 2015 16:19:01 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL.c
deleted file mode 100644
index dacd0f7..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-#if defined(__WIN32__)
-#include "core/windows/SDL_windows.h"
-#endif
-
-/* Initialization code for SDL */
-
-#include "SDL.h"
-#include "SDL_bits.h"
-#include "SDL_revision.h"
-#include "SDL_assert_c.h"
-#include "events/SDL_events_c.h"
-#include "haptic/SDL_haptic_c.h"
-#include "joystick/SDL_joystick_c.h"
-
-/* Initialization/Cleanup routines */
-#if !SDL_TIMERS_DISABLED
-extern int SDL_TimerInit(void);
-extern void SDL_TimerQuit(void);
-extern void SDL_TicksInit(void);
-extern void SDL_TicksQuit(void);
-#endif
-#if SDL_VIDEO_DRIVER_WINDOWS
-extern int SDL_HelperWindowCreate(void);
-extern int SDL_HelperWindowDestroy(void);
-#endif
-
-
-/* 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 ];
-
-/* Private helper to increment a subsystem's ref counter. */
-static void
-SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem)
-{
-    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
-    SDL_assert(SDL_SubsystemRefCount[subsystem_index] < 255);
-    ++SDL_SubsystemRefCount[subsystem_index];
-}
-
-/* Private helper to decrement a subsystem's ref counter. */
-static void
-SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
-{
-    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
-    if (SDL_SubsystemRefCount[subsystem_index] > 0) {
-        --SDL_SubsystemRefCount[subsystem_index];
-    }
-}
-
-/* Private helper to check if a system needs init. */
-static SDL_bool
-SDL_PrivateShouldInitSubsystem(Uint32 subsystem)
-{
-    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
-    SDL_assert(SDL_SubsystemRefCount[subsystem_index] < 255);
-    return (SDL_SubsystemRefCount[subsystem_index] == 0);
-}
-
-/* Private helper to check if a system needs to be quit. */
-static SDL_bool
-SDL_PrivateShouldQuitSubsystem(Uint32 subsystem) {
-    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
-    if (SDL_SubsystemRefCount[subsystem_index] == 0) {
-      return SDL_FALSE;
-    }
-
-    /* If we're in SDL_Quit, we shut down every subsystem, even if refcount
-     * isn't zero.
-     */
-    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;
-    }
-
-    /* Clear the error message */
-    SDL_ClearError();
-
-#if SDL_VIDEO_DRIVER_WINDOWS
-	if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
-		if (SDL_HelperWindowCreate() < 0) {
-			return -1;
-		}
-	}
-#endif
-
-#if !SDL_TIMERS_DISABLED
-    SDL_TicksInit();
-#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 !SDL_TIMERS_DISABLED
-        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_TIMER)) {
-            if (SDL_TimerInit() < 0) {
-                return (-1);
-            }
-        }
-        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_TIMER);
-#else
-        return SDL_SetError("SDL not built with timer support");
-#endif
-    }
-
-    /* Initialize the video subsystem */
-    if ((flags & SDL_INIT_VIDEO)){
-#if !SDL_VIDEO_DISABLED
-        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_VIDEO)) {
-            if (SDL_VideoInit(NULL) < 0) {
-                return (-1);
-            }
-        }
-        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_VIDEO);
-#else
-        return SDL_SetError("SDL not built with video support");
-#endif
-    }
-
-    /* Initialize the audio subsystem */
-    if ((flags & SDL_INIT_AUDIO)){
-#if !SDL_AUDIO_DISABLED
-        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_AUDIO)) {
-            if (SDL_AudioInit(NULL) < 0) {
-                return (-1);
-            }
-        }
-        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_AUDIO);
-#else
-        return SDL_SetError("SDL not built with audio support");
-#endif
-    }
-
-    /* Initialize the joystick subsystem */
-    if ((flags & SDL_INIT_JOYSTICK)){
-#if !SDL_JOYSTICK_DISABLED
-        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_JOYSTICK)) {
-           if (SDL_JoystickInit() < 0) {
-               return (-1);
-           }
-        }
-        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_JOYSTICK);
-#else
-        return SDL_SetError("SDL not built with joystick support");
-#endif
-    }
-
-    if ((flags & SDL_INIT_GAMECONTROLLER)){
-#if !SDL_JOYSTICK_DISABLED
-        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_GAMECONTROLLER)) {
-            if (SDL_GameControllerInit() < 0) {
-                return (-1);
-            }
-        }
-        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_GAMECONTROLLER);
-#else
-        return SDL_SetError("SDL not built with joystick support");
-#endif
-    }
-
-    /* Initialize the haptic subsystem */
-    if ((flags & SDL_INIT_HAPTIC)){
-#if !SDL_HAPTIC_DISABLED
-        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_HAPTIC)) {
-            if (SDL_HapticInit() < 0) {
-                return (-1);
-            }
-        }
-        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_HAPTIC);
-#else
-        return SDL_SetError("SDL not built with haptic (force feedback) support");
-#endif
-    }
-
-    return (0);
-}
-
-int
-SDL_Init(Uint32 flags)
-{
-    return SDL_InitSubSystem(flags);
-}
-
-void
-SDL_QuitSubSystem(Uint32 flags)
-{
-    /* Shut down requested initialized subsystems */
-#if !SDL_JOYSTICK_DISABLED
-    if ((flags & SDL_INIT_GAMECONTROLLER)) {
-        /* 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)) {
-        /* joystick implies events */
-        flags |= SDL_INIT_EVENTS;
-
-        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_JOYSTICK)) {
-            SDL_JoystickQuit();
-        }
-        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_JOYSTICK);
-    }
-#endif
-
-#if !SDL_HAPTIC_DISABLED
-    if ((flags & SDL_INIT_HAPTIC)) {
-        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_HAPTIC)) {
-            SDL_HapticQuit();
-        }
-        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_HAPTIC);
-    }
-#endif
-
-#if !SDL_AUDIO_DISABLED
-    if ((flags & SDL_INIT_AUDIO)) {
-        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_AUDIO)) {
-            SDL_AudioQuit();
-        }
-        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_AUDIO);
-    }
-#endif
-
-#if !SDL_VIDEO_DISABLED
-    if ((flags & SDL_INIT_VIDEO)) {
-        /* video implies events */
-        flags |= SDL_INIT_EVENTS;
-
-        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_VIDEO)) {
-            SDL_VideoQuit();
-        }
-        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_VIDEO);
-    }
-#endif
-
-#if !SDL_TIMERS_DISABLED
-    if ((flags & SDL_INIT_TIMER)) {
-        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_TIMER)) {
-            SDL_TimerQuit();
-        }
-        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
-SDL_WasInit(Uint32 flags)
-{
-    int i;
-    int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
-    Uint32 initialized = 0;
-
-    if (!flags) {
-        flags = SDL_INIT_EVERYTHING;
-    }
-
-    num_subsystems = SDL_min(num_subsystems, SDL_MostSignificantBitIndex32(flags) + 1);
-
-    /* Iterate over each bit in flags, and check the matching subsystem. */
-    for (i = 0; i < num_subsystems; ++i) {
-        if ((flags & 1) && SDL_SubsystemRefCount[i] > 0) {
-            initialized |= (1 << i);
-        }
-
-        flags >>= 1;
-    }
-
-    return initialized;
-}
-
-void
-SDL_Quit(void)
-{
-    SDL_bInMainQuit = SDL_TRUE;
-
-    /* Quit all subsystems */
-#if SDL_VIDEO_DRIVER_WINDOWS
-    SDL_HelperWindowDestroy();
-#endif
-    SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
-
-#if !SDL_TIMERS_DISABLED
-    SDL_TicksQuit();
-#endif
-
-    SDL_ClearHints();
-    SDL_AssertionsQuit();
-    SDL_LogResetPriorities();
-
-    /* Now that every subsystem has been quit, we reset the subsystem refcount
-     * and the list of initialized subsystems.
-     */
-    SDL_memset( SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount) );
-
-    SDL_bInMainQuit = SDL_FALSE;
-}
-
-/* Get the library version number */
-void
-SDL_GetVersion(SDL_version * ver)
-{
-    SDL_VERSION(ver);
-}
-
-/* Get the library source revision */
-const char *
-SDL_GetRevision(void)
-{
-    return SDL_REVISION;
-}
-
-/* Get the library source revision number */
-int
-SDL_GetRevisionNumber(void)
-{
-    return SDL_REVISION_NUMBER;
-}
-
-/* Get the name of the platform */
-const char *
-SDL_GetPlatform()
-{
-#if __AIX__
-    return "AIX";
-#elif __ANDROID__
-    return "Android";
-#elif __BSDI__
-    return "BSDI";
-#elif __DREAMCAST__
-    return "Dreamcast";
-#elif __FREEBSD__
-    return "FreeBSD";
-#elif __HAIKU__
-    return "Haiku";
-#elif __HPUX__
-    return "HP-UX";
-#elif __IRIX__
-    return "Irix";
-#elif __LINUX__
-    return "Linux";
-#elif __MINT__
-    return "Atari MiNT";
-#elif __MACOS__
-    return "MacOS Classic";
-#elif __MACOSX__
-    return "Mac OS X";
-#elif __NETBSD__
-    return "NetBSD";
-#elif __OPENBSD__
-    return "OpenBSD";
-#elif __OS2__
-    return "OS/2";
-#elif __OSF__
-    return "OSF/1";
-#elif __QNXNTO__
-    return "QNX Neutrino";
-#elif __RISCOS__
-    return "RISC OS";
-#elif __SOLARIS__
-    return "Solaris";
-#elif __WIN32__
-    return "Windows";
-#elif __IPHONEOS__
-    return "iOS";
-#elif __PSP__
-    return "PlayStation Portable";
-#else
-    return "Unknown (see SDL_platform.h)";
-#endif
-}
-
-#if defined(__WIN32__)
-
-#if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
-/* Need to include DllMain() on Watcom C for some reason.. */
-
-BOOL APIENTRY
-_DllMainCRTStartup(HANDLE hModule,
-                   DWORD ul_reason_for_call, LPVOID lpReserved)
-{
-    switch (ul_reason_for_call) {
-    case DLL_PROCESS_ATTACH:
-    case DLL_THREAD_ATTACH:
-    case DLL_THREAD_DETACH:
-    case DLL_PROCESS_DETACH:
-        break;
-    }
-    return TRUE;
-}
-#endif /* building DLL with Watcom C */
-
-#endif /* __WIN32__ */
-
-/* vi: set sts=4 ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert.c
deleted file mode 100644
index 98e7584..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert.c
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-#if defined(__WIN32__)
-#include "core/windows/SDL_windows.h"
-#endif
-
-#include "SDL.h"
-#include "SDL_atomic.h"
-#include "SDL_messagebox.h"
-#include "SDL_video.h"
-#include "SDL_assert.h"
-#include "SDL_assert_c.h"
-#include "video/SDL_sysvideo.h"
-
-#ifdef __WIN32__
-#ifndef WS_OVERLAPPEDWINDOW
-#define WS_OVERLAPPEDWINDOW 0
-#endif
-#else  /* fprintf, _exit(), etc. */
-#include <stdio.h>
-#include <stdlib.h>
-#if ! defined(__WINRT__)
-#include <unistd.h>
-#endif
-#endif
-
-static SDL_assert_state
-SDL_PromptAssertion(const SDL_assert_data *data, void *userdata);
-
-/*
- * We keep all triggered assertions in a singly-linked list so we can
- *  generate a report later.
- */
-static SDL_assert_data *triggered_assertions = NULL;
-
-static SDL_mutex *assertion_mutex = NULL;
-static SDL_AssertionHandler assertion_handler = SDL_PromptAssertion;
-static void *assertion_userdata = NULL;
-
-#ifdef __GNUC__
-static void
-debug_print(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
-#endif
-
-static void
-debug_print(const char *fmt, ...)
-{
-    va_list ap;
-    va_start(ap, fmt);
-    SDL_LogMessageV(SDL_LOG_CATEGORY_ASSERT, SDL_LOG_PRIORITY_WARN, fmt, ap);
-    va_end(ap);
-}
-
-
-static void SDL_AddAssertionToReport(SDL_assert_data *data)
-{
-    /* (data) is always a static struct defined with the assert macros, so
-       we don't have to worry about copying or allocating them. */
-    data->trigger_count++;
-    if (data->trigger_count == 1) {  /* not yet added? */
-        data->next = triggered_assertions;
-        triggered_assertions = data;
-    }
-}
-
-
-static void SDL_GenerateAssertionReport(void)
-{
-    const SDL_assert_data *item = triggered_assertions;
-
-    /* only do this if the app hasn't assigned an assertion handler. */
-    if ((item != NULL) && (assertion_handler != SDL_PromptAssertion)) {
-        debug_print("\n\nSDL assertion report.\n");
-        debug_print("All SDL assertions between last init/quit:\n\n");
-
-        while (item != NULL) {
-            debug_print(
-                "'%s'\n"
-                "    * %s (%s:%d)\n"
-                "    * triggered %u time%s.\n"
-                "    * always ignore: %s.\n",
-                item->condition, item->function, item->filename,
-                item->linenum, item->trigger_count,
-                (item->trigger_count == 1) ? "" : "s",
-                item->always_ignore ? "yes" : "no");
-            item = item->next;
-        }
-        debug_print("\n");
-
-        SDL_ResetAssertionReport();
-    }
-}
-
-static void SDL_ExitProcess(int exitcode)
-{
-#ifdef __WIN32__
-    ExitProcess(exitcode);
-#else
-    _exit(exitcode);
-#endif
-}
-
-static void SDL_AbortAssertion(void)
-{
-    SDL_Quit();
-    SDL_ExitProcess(42);
-}
-
-
-static SDL_assert_state
-SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
-{
-#ifdef __WIN32__
-    #define ENDLINE "\r\n"
-#else
-    #define ENDLINE "\n"
-#endif
-
-    const char *envr;
-    SDL_assert_state state = SDL_ASSERTION_ABORT;
-    SDL_Window *window;
-    SDL_MessageBoxData messagebox;
-    SDL_MessageBoxButtonData buttons[] = {
-        {   0,  SDL_ASSERTION_RETRY,            "Retry" },
-        {   0,  SDL_ASSERTION_BREAK,            "Break" },
-        {   0,  SDL_ASSERTION_ABORT,            "Abort" },
-        {   SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT,
-                SDL_ASSERTION_IGNORE,           "Ignore" },
-        {   SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT,
-                SDL_ASSERTION_ALWAYS_IGNORE,    "Always Ignore" }
-    };
-    char *message;
-    int selected;
-
-    (void) userdata;  /* unused in default handler. */
-
-    message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
-    if (!message) {
-        /* Uh oh, we're in real trouble now... */
-        return SDL_ASSERTION_ABORT;
-    }
-    SDL_snprintf(message, SDL_MAX_LOG_MESSAGE,
-                 "Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE
-                    "  '%s'",
-                 data->function, data->filename, data->linenum,
-                 data->trigger_count, (data->trigger_count == 1) ? "time" : "times",
-                 data->condition);
-
-    debug_print("\n\n%s\n\n", message);
-
-    /* let env. variable override, so unit tests won't block in a GUI. */
-    envr = SDL_getenv("SDL_ASSERT");
-    if (envr != NULL) {
-        SDL_stack_free(message);
-
-        if (SDL_strcmp(envr, "abort") == 0) {
-            return SDL_ASSERTION_ABORT;
-        } else if (SDL_strcmp(envr, "break") == 0) {
-            return SDL_ASSERTION_BREAK;
-        } else if (SDL_strcmp(envr, "retry") == 0) {
-            return SDL_ASSERTION_RETRY;
-        } else if (SDL_strcmp(envr, "ignore") == 0) {
-            return SDL_ASSERTION_IGNORE;
-        } else if (SDL_strcmp(envr, "always_ignore") == 0) {
-            return SDL_ASSERTION_ALWAYS_IGNORE;
-        } else {
-            return SDL_ASSERTION_ABORT;  /* oh well. */
-        }
-    }
-
-    /* Leave fullscreen mode, if possible (scary!) */
-    window = SDL_GetFocusWindow();
-    if (window) {
-        if (SDL_GetWindowFlags(window) & SDL_WINDOW_FULLSCREEN) {
-            SDL_MinimizeWindow(window);
-        } else {
-            /* !!! FIXME: ungrab the input if we're not fullscreen? */
-            /* No need to mess with the window */
-            window = NULL;
-        }
-    }
-
-    /* Show a messagebox if we can, otherwise fall back to stdio */
-    SDL_zero(messagebox);
-    messagebox.flags = SDL_MESSAGEBOX_WARNING;
-    messagebox.window = window;
-    messagebox.title = "Assertion Failed";
-    messagebox.message = message;
-    messagebox.numbuttons = SDL_arraysize(buttons);
-    messagebox.buttons = buttons;
-
-    if (SDL_ShowMessageBox(&messagebox, &selected) == 0) {
-        if (selected == -1) {
-            state = SDL_ASSERTION_IGNORE;
-        } else {
-            state = (SDL_assert_state)selected;
-        }
-    }
-#ifdef HAVE_STDIO_H
-    else
-    {
-        /* this is a little hacky. */
-        for ( ; ; ) {
-            char buf[32];
-            fprintf(stderr, "Abort/Break/Retry/Ignore/AlwaysIgnore? [abriA] : ");
-            fflush(stderr);
-            if (fgets(buf, sizeof (buf), stdin) == NULL) {
-                break;
-            }
-
-            if (SDL_strcmp(buf, "a") == 0) {
-                state = SDL_ASSERTION_ABORT;
-                break;
-            } else if (SDL_strcmp(buf, "b") == 0) {
-                state = SDL_ASSERTION_BREAK;
-                break;
-            } else if (SDL_strcmp(buf, "r") == 0) {
-                state = SDL_ASSERTION_RETRY;
-                break;
-            } else if (SDL_strcmp(buf, "i") == 0) {
-                state = SDL_ASSERTION_IGNORE;
-                break;
-            } else if (SDL_strcmp(buf, "A") == 0) {
-                state = SDL_ASSERTION_ALWAYS_IGNORE;
-                break;
-            }
-        }
-    }
-#endif /* HAVE_STDIO_H */
-
-    /* Re-enter fullscreen mode */
-    if (window) {
-        SDL_RestoreWindow(window);
-    }
-
-    SDL_stack_free(message);
-
-    return state;
-}
-
-
-SDL_assert_state
-SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file,
-                    int line)
-{
-    static int assertion_running = 0;
-    static SDL_SpinLock spinlock = 0;
-    SDL_assert_state state = SDL_ASSERTION_IGNORE;
-
-    SDL_AtomicLock(&spinlock);
-    if (assertion_mutex == NULL) { /* never called SDL_Init()? */
-        assertion_mutex = SDL_CreateMutex();
-        if (assertion_mutex == NULL) {
-            SDL_AtomicUnlock(&spinlock);
-            return SDL_ASSERTION_IGNORE;   /* oh well, I guess. */
-        }
-    }
-    SDL_AtomicUnlock(&spinlock);
-
-    if (SDL_LockMutex(assertion_mutex) < 0) {
-        return SDL_ASSERTION_IGNORE;   /* oh well, I guess. */
-    }
-
-    /* doing this because Visual C is upset over assigning in the macro. */
-    if (data->trigger_count == 0) {
-        data->function = func;
-        data->filename = file;
-        data->linenum = line;
-    }
-
-    SDL_AddAssertionToReport(data);
-
-    assertion_running++;
-    if (assertion_running > 1) {   /* assert during assert! Abort. */
-        if (assertion_running == 2) {
-            SDL_AbortAssertion();
-        } else if (assertion_running == 3) {  /* Abort asserted! */
-            SDL_ExitProcess(42);
-        } else {
-            while (1) { /* do nothing but spin; what else can you do?! */ }
-        }
-    }
-
-    if (!data->always_ignore) {
-        state = assertion_handler(data, assertion_userdata);
-    }
-
-    switch (state)
-    {
-        case SDL_ASSERTION_ABORT:
-            SDL_AbortAssertion();
-            return SDL_ASSERTION_IGNORE;  /* shouldn't return, but oh well. */
-
-        case SDL_ASSERTION_ALWAYS_IGNORE:
-            state = SDL_ASSERTION_IGNORE;
-            data->always_ignore = 1;
-            break;
-
-        case SDL_ASSERTION_IGNORE:
-        case SDL_ASSERTION_RETRY:
-        case SDL_ASSERTION_BREAK:
-            break;  /* macro handles these. */
-    }
-
-    assertion_running--;
-    SDL_UnlockMutex(assertion_mutex);
-
-    return state;
-}
-
-
-void SDL_AssertionsQuit(void)
-{
-    SDL_GenerateAssertionReport();
-    if (assertion_mutex != NULL) {
-        SDL_DestroyMutex(assertion_mutex);
-        assertion_mutex = NULL;
-    }
-}
-
-void SDL_SetAssertionHandler(SDL_AssertionHandler handler, void *userdata)
-{
-    if (handler != NULL) {
-        assertion_handler = handler;
-        assertion_userdata = userdata;
-    } else {
-        assertion_handler = SDL_PromptAssertion;
-        assertion_userdata = NULL;
-    }
-}
-
-const SDL_assert_data *SDL_GetAssertionReport(void)
-{
-    return triggered_assertions;
-}
-
-void SDL_ResetAssertionReport(void)
-{
-    SDL_assert_data *next = NULL;
-    SDL_assert_data *item;
-    for (item = triggered_assertions; item != NULL; item = next) {
-        next = (SDL_assert_data *) item->next;
-        item->always_ignore = SDL_FALSE;
-        item->trigger_count = 0;
-        item->next = NULL;
-    }
-
-    triggered_assertions = NULL;
-}
-
-SDL_AssertionHandler SDL_GetDefaultAssertionHandler(void)
-{
-    return SDL_PromptAssertion;
-}
-
-SDL_AssertionHandler SDL_GetAssertionHandler(void **userdata)
-{
-    if (userdata != NULL) {
-        *userdata = assertion_userdata;
-    }
-    return assertion_handler;
-}
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert_c.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert_c.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert_c.h
deleted file mode 100644
index f94b24c..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_assert_c.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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.
-*/
-
-extern void SDL_AssertionsQuit(void);
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error.c
deleted file mode 100644
index ecbf450..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-/* Simple error handling in SDL */
-
-#include "SDL_log.h"
-#include "SDL_error.h"
-#include "SDL_error_c.h"
-
-
-/* Routine to get the thread-specific error variable */
-#if SDL_THREADS_DISABLED
-/* The default (non-thread-safe) global error variable */
-static SDL_error SDL_global_error;
-#define SDL_GetErrBuf() (&SDL_global_error)
-#else
-extern SDL_error *SDL_GetErrBuf(void);
-#endif /* SDL_THREADS_DISABLED */
-
-#define SDL_ERRBUFIZE   1024
-
-/* Private functions */
-
-static const char *
-SDL_LookupString(const char *key)
-{
-    /* FIXME: Add code to lookup key in language string hash-table */
-    return key;
-}
-
-/* Public functions */
-
-int
-SDL_SetError(const char *fmt, ...)
-{
-    va_list ap;
-    SDL_error *error;
-
-    /* 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;
-    SDL_strlcpy((char *) error->key, fmt, sizeof(error->key));
-
-    va_start(ap, fmt);
-    error->argc = 0;
-    while (*fmt) {
-        if (*fmt++ == '%') {
-            while (*fmt == '.' || (*fmt >= '0' && *fmt <= '9')) {
-                ++fmt;
-            }
-            switch (*fmt++) {
-            case 0:            /* Malformed format string.. */
-                --fmt;
-                break;
-            case 'c':
-            case 'i':
-            case 'd':
-            case 'u':
-            case 'o':
-            case 'x':
-            case 'X':
-                error->args[error->argc++].value_i = va_arg(ap, int);
-                break;
-            case 'f':
-                error->args[error->argc++].value_f = va_arg(ap, double);
-                break;
-            case 'p':
-                error->args[error->argc++].value_ptr = va_arg(ap, void *);
-                break;
-            case 's':
-                {
-                    int i = error->argc;
-                    const char *str = va_arg(ap, const char *);
-                    if (str == NULL)
-                        str = "(null)";
-                    SDL_strlcpy((char *) error->args[i].buf, str,
-                                ERR_MAX_STRLEN);
-                    error->argc++;
-                }
-                break;
-            default:
-                break;
-            }
-            if (error->argc >= ERR_MAX_ARGS) {
-                break;
-            }
-        }
-    }
-    va_end(ap);
-
-    /* If we are in debug mode, print out an error message */
-    SDL_LogError(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError());
-
-    return -1;
-}
-
-/* This function has a bit more overhead than most error functions
-   so that it supports internationalization and thread-safe errors.
-*/
-static char *
-SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
-{
-    SDL_error *error;
-
-    /* Clear the error string */
-    *errstr = '\0';
-    --maxlen;
-
-    /* Get the thread-safe error, and print it out */
-    error = SDL_GetErrBuf();
-    if (error->error) {
-        const char *fmt;
-        char *msg = errstr;
-        int len;
-        int argi;
-
-        fmt = SDL_LookupString(error->key);
-        argi = 0;
-        while (*fmt && (maxlen > 0)) {
-            if (*fmt == '%') {
-                char tmp[32], *spot = tmp;
-                *spot++ = *fmt++;
-                while ((*fmt == '.' || (*fmt >= '0' && *fmt <= '9'))
-                       && spot < (tmp + SDL_arraysize(tmp) - 2)) {
-                    *spot++ = *fmt++;
-                }
-                *spot++ = *fmt++;
-                *spot++ = '\0';
-                switch (spot[-2]) {
-                case '%':
-                    *msg++ = '%';
-                    maxlen -= 1;
-                    break;
-                case 'c':
-                case 'i':
-                case 'd':
-                case 'u':
-                case 'o':
-                case 'x':
-                case 'X':
-                    len =
-                        SDL_snprintf(msg, maxlen, tmp,
-                                     error->args[argi++].value_i);
-                    msg += len;
-                    maxlen -= len;
-                    break;
-                case 'f':
-                    len =
-                        SDL_snprintf(msg, maxlen, tmp,
-                                     error->args[argi++].value_f);
-                    msg += len;
-                    maxlen -= len;
-                    break;
-                case 'p':
-                    len =
-                        SDL_snprintf(msg, maxlen, tmp,
-                                     error->args[argi++].value_ptr);
-                    msg += len;
-                    maxlen -= len;
-                    break;
-                case 's':
-                    len =
-                        SDL_snprintf(msg, maxlen, tmp,
-                                     SDL_LookupString(error->args[argi++].
-                                                      buf));
-                    msg += len;
-                    maxlen -= len;
-                    break;
-                }
-            } else {
-                *msg++ = *fmt++;
-                maxlen -= 1;
-            }
-        }
-        *msg = 0;               /* NULL terminate the string */
-    }
-    return (errstr);
-}
-
-/* Available for backwards compatibility */
-const char *
-SDL_GetError(void)
-{
-    static char errmsg[SDL_ERRBUFIZE];
-
-    return SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE);
-}
-
-void
-SDL_ClearError(void)
-{
-    SDL_error *error;
-
-    error = SDL_GetErrBuf();
-    error->error = 0;
-}
-
-/* Very common errors go here */
-int
-SDL_Error(SDL_errorcode code)
-{
-    switch (code) {
-    case SDL_ENOMEM:
-        return SDL_SetError("Out of memory");
-    case SDL_EFREAD:
-        return SDL_SetError("Error reading from datastream");
-    case SDL_EFWRITE:
-        return SDL_SetError("Error writing to datastream");
-    case SDL_EFSEEK:
-        return SDL_SetError("Error seeking in datastream");
-    case SDL_UNSUPPORTED:
-        return SDL_SetError("That operation is not supported");
-    default:
-        return SDL_SetError("Unknown SDL error");
-    }
-}
-
-#ifdef TEST_ERROR
-int
-main(int argc, char *argv[])
-{
-    char buffer[BUFSIZ + 1];
-
-    SDL_SetError("Hi there!");
-    printf("Error 1: %s\n", SDL_GetError());
-    SDL_ClearError();
-    SDL_memset(buffer, '1', BUFSIZ);
-    buffer[BUFSIZ] = 0;
-    SDL_SetError("This is the error: %s (%f)", buffer, 1.0);
-    printf("Error 2: %s\n", SDL_GetError());
-    exit(0);
-}
-#endif
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error_c.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error_c.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error_c.h
deleted file mode 100644
index 98c20c4..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_error_c.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-/* This file defines a structure that carries language-independent
-   error messages
-*/
-
-#ifndef _SDL_error_c_h
-#define _SDL_error_c_h
-
-#define ERR_MAX_STRLEN  128
-#define ERR_MAX_ARGS    5
-
-typedef struct SDL_error
-{
-    /* This is a numeric value corresponding to the current error */
-    int error;
-
-    /* This is a key used to index into a language hashtable containing
-       internationalized versions of the SDL error messages.  If the key
-       is not in the hashtable, or no hashtable is available, the key is
-       used directly as an error message format string.
-     */
-    char key[ERR_MAX_STRLEN];
-
-    /* These are the arguments for the error functions */
-    int argc;
-    union
-    {
-        void *value_ptr;
-#if 0                           /* What is a character anyway?  (UNICODE issues) */
-        unsigned char value_c;
-#endif
-        int value_i;
-        double value_f;
-        char buf[ERR_MAX_STRLEN];
-    } args[ERR_MAX_ARGS];
-} SDL_error;
-
-/* Defined in SDL_thread.c */
-extern SDL_error *SDL_GetErrBuf(void);
-
-#endif /* _SDL_error_c_h */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_hints.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_hints.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_hints.c
deleted file mode 100644
index 365459e..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_hints.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-#include "SDL_hints.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 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_HintWatch *callbacks;
-    struct SDL_Hint *next;
-} SDL_Hint;
-
-static SDL_Hint *SDL_hints;
-
-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;
-    }
-
-    env = SDL_getenv(name);
-    if (env && priority < SDL_HINT_OVERRIDE) {
-        return SDL_FALSE;
-    }
-
-    for (hint = SDL_hints; hint; hint = hint->next) {
-        if (SDL_strcmp(name, hint->name) == 0) {
-            if (priority < hint->priority) {
-                return SDL_FALSE;
-            }
-            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;
-                }
-                SDL_free(hint->value);
-                hint->value = value ? SDL_strdup(value) : NULL;
-            }
-            hint->priority = priority;
-            return SDL_TRUE;
-        }
-    }
-
-    /* Couldn't find the hint, add a new one */
-    hint = (SDL_Hint *)SDL_malloc(sizeof(*hint));
-    if (!hint) {
-        return SDL_FALSE;
-    }
-    hint->name = SDL_strdup(name);
-    hint->value = value ? SDL_strdup(value) : NULL;
-    hint->priority = priority;
-    hint->callbacks = NULL;
-    hint->next = SDL_hints;
-    SDL_hints = hint;
-    return SDL_TRUE;
-}
-
-SDL_bool
-SDL_SetHint(const char *name, const char *value)
-{
-    return SDL_SetHintWithPriority(name, value, SDL_HINT_NORMAL);
-}
-
-const char *
-SDL_GetHint(const char *name)
-{
-    const char *env;
-    SDL_Hint *hint;
-
-    env = SDL_getenv(name);
-    for (hint = SDL_hints; hint; hint = hint->next) {
-        if (SDL_strcmp(name, hint->name) == 0) {
-            if (!env || hint->priority == SDL_HINT_OVERRIDE) {
-                return hint->value;
-            }
-            break;
-        }
-    }
-    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);
-        for (entry = hint->callbacks; entry; ) {
-            SDL_HintWatch *freeable = entry;
-            entry = entry->next;
-            SDL_free(freeable);
-        }
-        SDL_free(hint);
-    }
-}
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_internal.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_internal.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_internal.h
deleted file mode 100644
index cb66abd..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_internal.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal_h
-#define _SDL_internal_h
-
-#include "dynapi/SDL_dynapi.h"
-
-#if SDL_DYNAMIC_API
-#include "dynapi/SDL_dynapi_overrides.h"
-/* force DECLSPEC and SDLCALL off...it's all internal symbols now.
-   These will have actual #defines during SDL_dynapi.c only */
-#define DECLSPEC
-#define SDLCALL
-#endif
-
-#include "SDL_config.h"
-
-#endif
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_log.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_log.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_log.c
deleted file mode 100644
index 39aa3e4..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/SDL_log.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-#if defined(__WIN32__) || defined(__WINRT__)
-#include "core/windows/SDL_windows.h"
-#endif
-
-/* Simple log messages in SDL */
-
-#include "SDL_log.h"
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#if defined(__ANDROID__)
-#include <android/log.h>
-#endif
-
-#define DEFAULT_PRIORITY                SDL_LOG_PRIORITY_CRITICAL
-#define DEFAULT_ASSERT_PRIORITY         SDL_LOG_PRIORITY_WARN
-#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;
-    SDL_LogPriority priority;
-    struct SDL_LogLevel *next;
-} SDL_LogLevel;
-
-/* The default log output function */
-static void SDL_LogOutput(void *userdata,
-                          int category, SDL_LogPriority priority,
-                          const char *message);
-
-static SDL_LogLevel *SDL_loglevels;
-static SDL_LogPriority SDL_default_priority = DEFAULT_PRIORITY;
-static SDL_LogPriority SDL_assert_priority = DEFAULT_ASSERT_PRIORITY;
-static SDL_LogPriority SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
-static SDL_LogPriority SDL_test_priority = DEFAULT_TEST_PRIORITY;
-static SDL_LogOutputFunction SDL_log_function = SDL_LogOutput;
-static void *SDL_log_userdata = NULL;
-
-static const char *SDL_priority_prefixes[SDL_NUM_LOG_PRIORITIES] = {
-    NULL,
-    "VERBOSE",
-    "DEBUG",
-    "INFO",
-    "WARN",
-    "ERROR",
-    "CRITICAL"
-};
-
-#ifdef __ANDROID__
-static const char *SDL_category_prefixes[SDL_LOG_CATEGORY_RESERVED1] = {
-    "APP",
-    "ERROR",
-    "SYSTEM",
-    "AUDIO",
-    "VIDEO",
-    "RENDER",
-    "INPUT"
-};
-
-static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = {
-    ANDROID_LOG_UNKNOWN,
-    ANDROID_LOG_VERBOSE,
-    ANDROID_LOG_DEBUG,
-    ANDROID_LOG_INFO,
-    ANDROID_LOG_WARN,
-    ANDROID_LOG_ERROR,
-    ANDROID_LOG_FATAL
-};
-#endif /* __ANDROID__ */
-
-
-void
-SDL_LogSetAllPriority(SDL_LogPriority priority)
-{
-    SDL_LogLevel *entry;
-
-    for (entry = SDL_loglevels; entry; entry = entry->next) {
-        entry->priority = priority;
-    }
-    SDL_default_priority = priority;
-    SDL_assert_priority = priority;
-    SDL_application_priority = priority;
-}
-
-void
-SDL_LogSetPriority(int category, SDL_LogPriority priority)
-{
-    SDL_LogLevel *entry;
-
-    for (entry = SDL_loglevels; entry; entry = entry->next) {
-        if (entry->category == category) {
-            entry->priority = priority;
-            return;
-        }
-    }
-
-    /* Create a new entry */
-    entry = (SDL_LogLevel *)SDL_malloc(sizeof(*entry));
-    if (entry) {
-        entry->category = category;
-        entry->priority = priority;
-        entry->next = SDL_loglevels;
-        SDL_loglevels = entry;
-    }
-}
-
-SDL_LogPriority
-SDL_LogGetPriority(int category)
-{
-    SDL_LogLevel *entry;
-
-    for (entry = SDL_loglevels; entry; entry = entry->next) {
-        if (entry->category == category) {
-            return entry->priority;
-        }
-    }
-
-    if (category == SDL_LOG_CATEGORY_TEST) {
-        return SDL_test_priority;
-    } else if (category == SDL_LOG_CATEGORY_APPLICATION) {
-        return SDL_application_priority;
-    } else if (category == SDL_LOG_CATEGORY_ASSERT) {
-        return SDL_assert_priority;
-    } else {
-        return SDL_default_priority;
-    }
-}
-
-void
-SDL_LogResetPriorities(void)
-{
-    SDL_LogLevel *entry;
-
-    while (SDL_loglevels) {
-        entry = SDL_loglevels;
-        SDL_loglevels = entry->next;
-        SDL_free(entry);
-    }
-
-    SDL_default_priority = DEFAULT_PRIORITY;
-    SDL_assert_priority = DEFAULT_ASSERT_PRIORITY;
-    SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
-    SDL_test_priority = DEFAULT_TEST_PRIORITY;
-}
-
-void
-SDL_Log(const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogVerbose(int category, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, SDL_LOG_PRIORITY_VERBOSE, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogDebug(int category, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, SDL_LOG_PRIORITY_DEBUG, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogInfo(int category, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, SDL_LOG_PRIORITY_INFO, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogWarn(int category, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, SDL_LOG_PRIORITY_WARN, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogError(int category, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, SDL_LOG_PRIORITY_ERROR, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogCritical(int category, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, SDL_LOG_PRIORITY_CRITICAL, fmt, ap);
-    va_end(ap);
-}
-
-void
-SDL_LogMessage(int category, SDL_LogPriority priority, const char *fmt, ...)
-{
-    va_list ap;
-
-    va_start(ap, fmt);
-    SDL_LogMessageV(category, priority, fmt, ap);
-    va_end(ap);
-}
-
-#ifdef __ANDROID__
-static const char *
-GetCategoryPrefix(int category)
-{
-    if (category < SDL_LOG_CATEGORY_RESERVED1) {
-        return SDL_category_prefixes[category];
-    }
-    if (category < SDL_LOG_CATEGORY_CUSTOM) {
-        return "RESERVED";
-    }
-    return "CUSTOM";
-}
-#endif /* __ANDROID__ */
-
-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) {
-        return;
-    }
-
-    /* Make sure we don't exceed array bounds */
-    if ((int)priority < 0 || priority >= SDL_NUM_LOG_PRIORITIES) {
-        return;
-    }
-
-    /* See if we want to do anything with this message */
-    if (priority < SDL_LogGetPriority(category)) {
-        return;
-    }
-
-    message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
-    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);
-}
-
-#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)
-{
-#if defined(__WIN32__) || defined(__WINRT__)
-    /* Way too many allocations here, urgh */
-    /* Note: One can't call SDL_SetError here, since that function itself logs. */
-    {
-        char *output;
-        size_t length;
-        LPTSTR tstr;
-
-#ifndef __WINRT__
-        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) {
-                        OutputDebugString(TEXT("Parent process has no console\r\n"));
-                        consoleAttached = -1;
-                    } else if (attachError == ERROR_GEN_FAILURE) {
-                         OutputDebugString(TEXT("Could not attach to console of parent process\r\n"));
-                         consoleAttached = -1;
-                    } else if (attachError == ERROR_ACCESS_DENIED) {  
-                         /* Already attached */
-                        consoleAttached = 1;
-                    } else {
-                        OutputDebugString(TEXT("Error attaching console\r\n"));
-                        consoleAttached = -1;
-                    }
-                } else {
-                    /* Newly attached */
-                    consoleAttached = 1;
-                }
-			
-                if (consoleAttached == 1) {
-                        stderrHandle = GetStdHandle(STD_ERROR_HANDLE);
-                }
-        }
-#endif /* ifndef __WINRT__ */
-
-        length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1 + 1;
-        output = SDL_stack_alloc(char, length);
-        SDL_snprintf(output, length, "%s: %s\r\n", SDL_priority_prefixes[priority], message);
-        tstr = WIN_UTF8ToString(output);
-        
-        /* Output to debugger */
-        OutputDebugString(tstr);
-       
-#ifndef __WINRT__
-        /* Screen output to stderr, if console was attached. */
-        if (consoleAttached == 1) {
-                if (!WriteConsole(stderrHandle, tstr, lstrlen(tstr), &charsWritten, NULL)) {
-                    OutputDebugString(TEXT("Error calling WriteConsole\r\n"));
-                }
-                if (charsWritten == ERROR_NOT_ENOUGH_MEMORY) {
-                    OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
-                }
-        }
-#endif /* ifndef __WINRT__ */
-
-        SDL_free(tstr);
-        SDL_stack_free(output);
-    }
-#elif defined(__ANDROID__)
-    {
-        char tag[32];
-
-        SDL_snprintf(tag, SDL_arraysize(tag), "SDL/%s", GetCategoryPrefix(category));
-        __android_log_write(SDL_android_priority[priority], tag, message);
-    }
-#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;
-
-        text = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
-        if (text) {
-            SDL_snprintf(text, SDL_MAX_LOG_MESSAGE, "%s: %s", SDL_priority_prefixes[priority], message);
-            SDL_NSLog(text);
-            SDL_stack_free(text);
-            return;
-        }
-    }
-#elif defined(__PSP__)
-    {
-        FILE*        pFile;
-        pFile = fopen ("SDL_Log.txt", "a");
-        fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message);
-        fclose (pFile);
-    }
-#endif
-#if HAVE_STDIO_H
-    fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);
-#endif
-}
-
-void
-SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata)
-{
-    if (callback) {
-        *callback = SDL_log_function;
-    }
-    if (userdata) {
-        *userdata = SDL_log_userdata;
-    }
-}
-
-void
-SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata)
-{
-    SDL_log_function = callback;
-    SDL_log_userdata = userdata;
-}
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_atomic.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_atomic.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_atomic.c
deleted file mode 100644
index be3f400..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_atomic.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-#include "SDL_atomic.h"
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-#include <intrin.h>
-#define HAVE_MSC_ATOMICS 1
-#endif
-
-#if defined(__MACOSX__)  /* !!! FIXME: should we favor gcc atomics? */
-#include <libkern/OSAtomic.h>
-#endif
-
-/*
-  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
-  locks and pick which one to use based on the address of the operand
-  of the function.
-
-  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.
-
-  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
-  data have only a 1/32 chance of hitting the same lock. That should
-  pretty much eliminate the chances of several atomic operations on
-  different data from waiting on the same "big lock". If it isn't
-  then the table of locks can be expanded to a new size so long as
-  the new size is a power of two.
-
-  Contributed by Bob Pendleton, bob@pendleton.com
-*/
-
-#if !defined(HAVE_MSC_ATOMICS) && !defined(HAVE_GCC_ATOMICS) && !defined(__MACOSX__)
-#define EMULATE_CAS 1
-#endif
-
-#if EMULATE_CAS
-static SDL_SpinLock locks[32];
-
-static SDL_INLINE void
-enterLock(void *a)
-{
-    uintptr_t index = ((((uintptr_t)a) >> 3) & 0x1f);
-
-    SDL_AtomicLock(&locks[index]);
-}
-
-static SDL_INLINE void
-leaveLock(void *a)
-{
-    uintptr_t index = ((((uintptr_t)a) >> 3) & 0x1f);
-
-    SDL_AtomicUnlock(&locks[index]);
-}
-#endif
-
-
-SDL_bool
-SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
-{
-#ifdef HAVE_MSC_ATOMICS
-    return (_InterlockedCompareExchange((long*)&a->value, (long)newval, (long)oldval) == (long)oldval);
-#elif defined(__MACOSX__)  /* !!! FIXME: should we favor gcc atomics? */
-    return (SDL_bool) OSAtomicCompareAndSwap32Barrier(oldval, newval, &a->value);
-#elif defined(HAVE_GCC_ATOMICS)
-    return (SDL_bool) __sync_bool_compare_and_swap(&a->value, oldval, newval);
-#elif EMULATE_CAS
-    SDL_bool retval = SDL_FALSE;
-
-    enterLock(a);
-    if (a->value == oldval) {
-        a->value = newval;
-        retval = SDL_TRUE;
-    }
-    leaveLock(a);
-
-    return retval;
-#else
-    #error Please define your platform.
-#endif
-}
-
-SDL_bool
-SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
-{
-#if defined(HAVE_MSC_ATOMICS) && (_M_IX86)
-    return (_InterlockedCompareExchange((long*)a, (long)newval, (long)oldval) == (long)oldval);
-#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86)
-    return (_InterlockedCompareExchangePointer(a, newval, oldval) == oldval);
-#elif defined(__MACOSX__) && defined(__LP64__)   /* !!! FIXME: should we favor gcc atomics? */
-    return (SDL_bool) OSAtomicCompareAndSwap64Barrier((int64_t)oldval, (int64_t)newval, (int64_t*) a);
-#elif defined(__MACOSX__) && !defined(__LP64__)  /* !!! FIXME: should we favor gcc atomics? */
-    return (SDL_bool) OSAtomicCompareAndSwap32Barrier((int32_t)oldval, (int32_t)newval, (int32_t*) a);
-#elif defined(HAVE_GCC_ATOMICS)
-    return __sync_bool_compare_and_swap(a, oldval, newval);
-#elif EMULATE_CAS
-    SDL_bool retval = SDL_FALSE;
-
-    enterLock(a);
-    if (*a == oldval) {
-        *a = newval;
-        retval = SDL_TRUE;
-    }
-    leaveLock(a);
-
-    return retval;
-#else
-    #error Please define your platform.
-#endif
-}
-
-int
-SDL_AtomicSet(SDL_atomic_t *a, int v)
-{
-#ifdef HAVE_MSC_ATOMICS
-    return _InterlockedExchange((long*)&a->value, v);
-#elif defined(HAVE_GCC_ATOMICS)
-    return __sync_lock_test_and_set(&a->value, v);
-#else
-    int value;
-    do {
-        value = a->value;
-    } while (!SDL_AtomicCAS(a, value, v));
-    return value;
-#endif
-}
-
-void*
-SDL_AtomicSetPtr(void **a, void *v)
-{
-#if defined(HAVE_MSC_ATOMICS) && (_M_IX86)
-    return (void *) _InterlockedExchange((long *)a, (long) v);
-#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86)
-    return _InterlockedExchangePointer(a, v);
-#elif defined(HAVE_GCC_ATOMICS)
-    return __sync_lock_test_and_set(a, v);
-#else
-    void *value;
-    do {
-        value = *a;
-    } while (!SDL_AtomicCASPtr(a, value, v));
-    return value;
-#endif
-}
-
-int
-SDL_AtomicAdd(SDL_atomic_t *a, int v)
-{
-#ifdef HAVE_MSC_ATOMICS
-    return _InterlockedExchangeAdd((long*)&a->value, v);
-#elif defined(HAVE_GCC_ATOMICS)
-    return __sync_fetch_and_add(&a->value, v);
-#else
-    int value;
-    do {
-        value = a->value;
-    } while (!SDL_AtomicCAS(a, value, (value + v)));
-    return value;
-#endif
-}
-
-int
-SDL_AtomicGet(SDL_atomic_t *a)
-{
-    int value;
-    do {
-        value = a->value;
-    } while (!SDL_AtomicCAS(a, value, value));
-    return value;
-}
-
-void *
-SDL_AtomicGetPtr(void **a)
-{
-    void *value;
-    do {
-        value = *a;
-    } while (!SDL_AtomicCASPtr(a, value, value));
-    return value;
-}
-
-#ifdef __thumb__
-#if 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
-#endif
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_spinlock.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_spinlock.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_spinlock.c
deleted file mode 100644
index 2d8446d..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/atomic/SDL_spinlock.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  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_internal.h"
-
-#if defined(__WIN32__) || defined(__WINRT__)
-#include "../core/windows/SDL_windows.h"
-#endif
-
-#include "SDL_atomic.h"
-#include "SDL_mutex.h"
-#include "SDL_timer.h"
-
-
-/* This function is where all the magic happens... */
-SDL_bool
-SDL_AtomicTryLock(SDL_SpinLock *lock)
-{
-#if SDL_ATOMIC_DISABLED
-    /* Terrible terrible damage */
-    static SDL_mutex *_spinlock_mutex;
-
-    if (!_spinlock_mutex) {
-        /* Race condition on first lock... */
-        _spinlock_mutex = SDL_CreateMutex();
-    }
-    SDL_LockMutex(_spinlock_mutex);
-    if (*lock == 0) {
-        *lock = 1;
-        SDL_UnlockMutex(_spinlock_mutex);
-        return SDL_TRUE;
-    } else {
-        SDL_UnlockMutex(_spinlock_mutex);
-        return SDL_FALSE;
-    }
-
-#elif defined(_MSC_VER)
-    SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long));
-    return (InterlockedExchange((long*)lock, 1) == 0);
-
-#elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
-    return (__sync_lock_test_and_set(lock, 1) == 0);
-
-#elif defined(__GNUC__) && defined(__arm__) && \
-        (defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \
-         defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__) || \
-         defined(__ARM_ARCH_5TEJ__))
-    int result;
-    __asm__ __volatile__ (
-        "swp %0, %1, [%2]\n"
-        : "=&r,&r" (result) : "r,0" (1), "r,r" (lock) : "memory");
-    return (result == 0);
-
-#elif defined(__GNUC__) && defined(__arm__)
-    int result;
-    __asm__ __volatile__ (
-        "ldrex %0, [%2]\nteq   %0, #0\nstrexeq %0, %1, [%2]"
-        : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory");
-    return (result == 0);
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-    int result;
-    __asm__ __volatile__(
-        "lock ; xchgl %0, (%1)\n"
-        : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory");
-    return (result == 0);
-
-#elif defined(__MACOSX__) || defined(__IPHONEOS__)
-    /* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */
-    return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
-
-#elif HAVE_PTHREAD_SPINLOCK
-    /* pthread instructions */
-    return (pthread_spin_trylock(lock) == 0);
-
-#else
-#error Please implement for your platform.
-    return SDL_FALSE;
-#endif
-}
-
-void
-SDL_AtomicLock(SDL_SpinLock *lock)
-{
-    /* FIXME: Should we have an eventual timeout? */
-    while (!SDL_AtomicTryLock(lock)) {
-        SDL_Delay(0);
-    }
-}
-
-void
-SDL_AtomicUnlock(SDL_SpinLock *lock)
-{
-#if defined(_MSC_VER)
-    _ReadWriteBarrier();
-    *lock = 0;
-
-#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
-}
-
-/* vi: set ts=4 sw=4 expandtab: */


Mime
View raw message