src/SDL.c
author Jørgen P. Tjernø <jorgen@valvesoftware.com>
Mon, 25 Feb 2013 16:52:50 -0800
changeset 6924 5be9b933146a
parent 6885 700f1b25f77f
child 6927 982b03203b73
permissions -rw-r--r--
sdl2
- fix ref counting on init, make sure you refcount each init calls and not just the first one
slouken@0
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6885
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@0
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@0
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@0
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@0
    20
*/
slouken@1402
    21
#include "SDL_config.h"
slouken@0
    22
slouken@0
    23
/* Initialization code for SDL */
slouken@0
    24
slouken@1361
    25
#include "SDL.h"
jorgen@6866
    26
#include "SDL_bits.h"
slouken@5310
    27
#include "SDL_revision.h"
slouken@1361
    28
#include "SDL_fatal.h"
slouken@4472
    29
#include "SDL_assert_c.h"
slouken@4472
    30
#include "haptic/SDL_haptic_c.h"
slouken@4472
    31
#include "joystick/SDL_joystick_c.h"
slouken@3647
    32
slouken@0
    33
/* Initialization/Cleanup routines */
slouken@1361
    34
#if !SDL_TIMERS_DISABLED
slouken@0
    35
extern void SDL_StartTicks(void);
slouken@1895
    36
extern int SDL_TimerInit(void);
slouken@0
    37
extern void SDL_TimerQuit(void);
slouken@0
    38
#endif
slouken@5086
    39
#if defined(__WIN32__)
slouken@2713
    40
extern int SDL_HelperWindowCreate(void);
slouken@2713
    41
extern int SDL_HelperWindowDestroy(void);
slouken@2713
    42
#endif
slouken@0
    43
slouken@3647
    44
slouken@0
    45
/* The initialized subsystems */
slouken@0
    46
static Uint32 ticks_started = 0;
slouken@6690
    47
static SDL_bool SDL_bInMainQuit = SDL_FALSE;
jorgen@6866
    48
static Uint8 SDL_SubsystemRefCount[ 32 ];
slouken@0
    49
jorgen@6866
    50
/* Private helper to increment a subsystem's ref counter. */
jorgen@6867
    51
static void
jorgen@6867
    52
SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem)
slouken@6690
    53
{
jorgen@6866
    54
    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
jorgen@6866
    55
    SDL_assert(SDL_SubsystemRefCount[subsystem_index] < 255);
jorgen@6866
    56
    ++SDL_SubsystemRefCount[subsystem_index];
jorgen@6866
    57
}
slouken@6690
    58
jorgen@6866
    59
/* Private helper to decrement a subsystem's ref counter. */
jorgen@6867
    60
static void
jorgen@6867
    61
SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
jorgen@6866
    62
{
jorgen@6866
    63
    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
jorgen@6866
    64
    if (SDL_SubsystemRefCount[subsystem_index] > 0) {
jorgen@6866
    65
        --SDL_SubsystemRefCount[subsystem_index];
jorgen@6866
    66
    }
jorgen@6866
    67
}
jorgen@6866
    68
jorgen@6866
    69
/* Private helper to check if a system needs init. */
jorgen@6866
    70
static SDL_bool
jorgen@6866
    71
SDL_PrivateShouldInitSubsystem(Uint32 flags, Uint32 subsystem)
jorgen@6866
    72
{
jorgen@6867
    73
    int subsystem_index;
jorgen@6866
    74
    if ((flags & subsystem) == 0) {
jorgen@6866
    75
      return SDL_FALSE;
jorgen@6866
    76
    }
jorgen@6866
    77
jorgen@6867
    78
    subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
jorgen@6866
    79
    SDL_assert(SDL_SubsystemRefCount[subsystem_index] < 255);
jorgen@6866
    80
    return (SDL_SubsystemRefCount[subsystem_index] == 0);
jorgen@6866
    81
}
jorgen@6866
    82
jorgen@6866
    83
/* Private helper to check if a system needs to be quit. */
jorgen@6866
    84
static SDL_bool
jorgen@6866
    85
SDL_PrivateShouldQuitSubsystem(Uint32 subsystem) {
jorgen@6866
    86
    int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
jorgen@6866
    87
    if (SDL_SubsystemRefCount[subsystem_index] == 0) {
jorgen@6866
    88
      return SDL_FALSE;
jorgen@6866
    89
    }
jorgen@6866
    90
jorgen@6866
    91
    /* If we're in SDL_Quit, we shut down every subsystem, even if refcount
jorgen@6866
    92
     * isn't zero.
jorgen@6866
    93
     */
jorgen@6866
    94
    return SDL_SubsystemRefCount[subsystem_index] == 1 || SDL_bInMainQuit;
slouken@6690
    95
}
slouken@0
    96
slouken@1895
    97
int
slouken@1895
    98
SDL_InitSubSystem(Uint32 flags)
slouken@0
    99
{
slouken@6128
   100
#if !SDL_TIMERS_DISABLED
slouken@6128
   101
    if (!ticks_started) {
slouken@6128
   102
        SDL_StartTicks();
slouken@6128
   103
        ticks_started = 1;
slouken@6128
   104
    }
jorgen@6866
   105
#endif
slouken@6690
   106
jorgen@6866
   107
    /* Initialize the timer subsystem */
jorgen@6924
   108
    if ((flags & SDL_INIT_TIMER) ){
jorgen@6924
   109
        if (SDL_PrivateShouldInitSubsystem(flags, SDL_INIT_TIMER)) {
jorgen@6866
   110
#if !SDL_TIMERS_DISABLED
jorgen@6924
   111
            if (SDL_TimerInit() < 0) {
jorgen@6924
   112
                return (-1);
jorgen@6924
   113
            }
jorgen@6866
   114
        }
jorgen@6866
   115
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_TIMER);
slouken@6128
   116
#else
slouken@6128
   117
        SDL_SetError("SDL not built with timer support");
slouken@6128
   118
        return (-1);
jorgen@6866
   119
#endif
slouken@6128
   120
    }
slouken@6128
   121
jorgen@6866
   122
    /* Initialize the video/event subsystem */
jorgen@6924
   123
    if ((flags & SDL_INIT_VIDEO) ){
jorgen@6924
   124
        if (SDL_PrivateShouldInitSubsystem(flags, SDL_INIT_VIDEO)) {
slouken@1361
   125
#if !SDL_VIDEO_DISABLED
jorgen@6924
   126
            if (SDL_VideoInit(NULL) < 0) {
jorgen@6924
   127
                return (-1);
jorgen@6924
   128
            }
jorgen@6866
   129
        }
jorgen@6866
   130
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_VIDEO);
slouken@0
   131
#else
slouken@1895
   132
        SDL_SetError("SDL not built with video support");
slouken@1895
   133
        return (-1);
jorgen@6866
   134
#endif
slouken@1895
   135
    }
slouken@0
   136
jorgen@6866
   137
    /* Initialize the audio subsystem */
jorgen@6924
   138
    if ((flags & SDL_INIT_AUDIO) ){
jorgen@6924
   139
        if (SDL_PrivateShouldInitSubsystem(flags, SDL_INIT_AUDIO)) {
slouken@1361
   140
#if !SDL_AUDIO_DISABLED
jorgen@6924
   141
            if (SDL_AudioInit(NULL) < 0) {
jorgen@6924
   142
                return (-1);
jorgen@6924
   143
            }
jorgen@6866
   144
        }
jorgen@6866
   145
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_AUDIO);
slouken@0
   146
#else
slouken@1895
   147
        SDL_SetError("SDL not built with audio support");
slouken@1895
   148
        return (-1);
jorgen@6866
   149
#endif
slouken@1895
   150
    }
slouken@0
   151
jorgen@6866
   152
    if ((flags & SDL_INIT_GAMECONTROLLER)) {
jorgen@6866
   153
        // Game controller implies Joystick.
jorgen@6866
   154
        flags |= SDL_INIT_JOYSTICK;
jorgen@6866
   155
    }
jorgen@6866
   156
jorgen@6866
   157
    /* Initialize the joystick subsystem */
jorgen@6924
   158
    if ((flags & SDL_INIT_JOYSTICK) ){
jorgen@6924
   159
        if (SDL_PrivateShouldInitSubsystem(flags, SDL_INIT_JOYSTICK)) {
slouken@1361
   160
#if !SDL_JOYSTICK_DISABLED
jorgen@6924
   161
           if (SDL_JoystickInit() < 0) {
jorgen@6924
   162
               return (-1);
jorgen@6924
   163
           }
slouken@1895
   164
        }
jorgen@6866
   165
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_JOYSTICK);
slouken@0
   166
#else
slouken@1895
   167
        SDL_SetError("SDL not built with joystick support");
slouken@1895
   168
        return (-1);
jorgen@6866
   169
#endif
slouken@1895
   170
    }
jorgen@6866
   171
jorgen@6924
   172
    if ((flags & SDL_INIT_GAMECONTROLLER) ){
jorgen@6924
   173
        if (SDL_PrivateShouldInitSubsystem(flags, SDL_INIT_GAMECONTROLLER)) {
jorgen@6866
   174
#if !SDL_JOYSTICK_DISABLED
jorgen@6924
   175
            if (SDL_GameControllerInit() < 0) {
jorgen@6924
   176
                return (-1);
jorgen@6924
   177
            }
jorgen@6866
   178
        }
jorgen@6866
   179
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_GAMECONTROLLER);
jorgen@6866
   180
#else
jorgen@6866
   181
        SDL_SetError("SDL not built with joystick support");
jorgen@6866
   182
        return (-1);
slouken@0
   183
#endif
jorgen@6866
   184
    }
slouken@0
   185
jorgen@6866
   186
    /* Initialize the haptic subsystem */
jorgen@6924
   187
    if ((flags & SDL_INIT_HAPTIC) ){
jorgen@6924
   188
        if (SDL_PrivateShouldInitSubsystem(flags, SDL_INIT_HAPTIC)) {
slouken@2713
   189
#if !SDL_HAPTIC_DISABLED
jorgen@6924
   190
            if (SDL_HapticInit() < 0) {
jorgen@6924
   191
             return (-1);
jorgen@6924
   192
         }
jorgen@6866
   193
        }
jorgen@6866
   194
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_HAPTIC);
slouken@2713
   195
#else
slouken@2713
   196
        SDL_SetError("SDL not built with haptic (force feedback) support");
slouken@2713
   197
        return (-1);
jorgen@6866
   198
#endif
slouken@2713
   199
    }
jorgen@6866
   200
slouken@1895
   201
    return (0);
slouken@0
   202
}
slouken@0
   203
slouken@1895
   204
int
slouken@1895
   205
SDL_Init(Uint32 flags)
slouken@0
   206
{
slouken@3647
   207
    if (SDL_AssertionsInit() < 0) {
slouken@3647
   208
        return -1;
slouken@3647
   209
    }
slouken@3647
   210
slouken@1895
   211
    /* Clear the error message */
slouken@1895
   212
    SDL_ClearError();
slouken@0
   213
slouken@5086
   214
#if defined(__WIN32__)
slouken@2713
   215
    if (SDL_HelperWindowCreate() < 0) {
slouken@2713
   216
        return -1;
slouken@2713
   217
    }
slouken@2713
   218
#endif
slouken@2713
   219
slouken@1895
   220
    /* Initialize the desired subsystems */
slouken@1895
   221
    if (SDL_InitSubSystem(flags) < 0) {
slouken@1895
   222
        return (-1);
slouken@1895
   223
    }
slouken@0
   224
slouken@1895
   225
    /* Everything is initialized */
slouken@1895
   226
    if (!(flags & SDL_INIT_NOPARACHUTE)) {
slouken@1895
   227
        SDL_InstallParachute();
slouken@1895
   228
    }
slouken@3647
   229
slouken@1895
   230
    return (0);
slouken@0
   231
}
slouken@0
   232
slouken@1895
   233
void
slouken@1895
   234
SDL_QuitSubSystem(Uint32 flags)
slouken@0
   235
{
slouken@1895
   236
    /* Shut down requested initialized subsystems */
slouken@1361
   237
#if !SDL_JOYSTICK_DISABLED
jorgen@6866
   238
    if ((flags & SDL_INIT_GAMECONTROLLER)) {
jorgen@6866
   239
        // Game controller implies Joystick.
jorgen@6866
   240
        flags |= SDL_INIT_JOYSTICK;
jorgen@6866
   241
jorgen@6866
   242
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_GAMECONTROLLER)) {
jorgen@6866
   243
            SDL_GameControllerQuit();
slouken@6690
   244
		}
jorgen@6866
   245
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_GAMECONTROLLER);
jorgen@6866
   246
    }
slouken@6690
   247
jorgen@6866
   248
    if ((flags & SDL_INIT_JOYSTICK)) {
jorgen@6866
   249
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_JOYSTICK)) {
slouken@6690
   250
			SDL_JoystickQuit();
slouken@6690
   251
		}
jorgen@6866
   252
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_JOYSTICK);
slouken@1895
   253
    }
slouken@0
   254
#endif
jorgen@6866
   255
slouken@2713
   256
#if !SDL_HAPTIC_DISABLED
jorgen@6866
   257
    if ((flags & SDL_INIT_HAPTIC)) {
jorgen@6866
   258
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_HAPTIC)) {
slouken@6690
   259
			SDL_HapticQuit();
slouken@6690
   260
		}
jorgen@6866
   261
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_HAPTIC);
slouken@2713
   262
    }
slouken@2713
   263
#endif
jorgen@6866
   264
slouken@1361
   265
#if !SDL_AUDIO_DISABLED
jorgen@6866
   266
    if ((flags & SDL_INIT_AUDIO)) {
jorgen@6866
   267
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_AUDIO)) {
slouken@6690
   268
			SDL_AudioQuit();
slouken@6690
   269
		}
jorgen@6866
   270
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_AUDIO);
slouken@1895
   271
    }
slouken@0
   272
#endif
jorgen@6866
   273
slouken@1361
   274
#if !SDL_VIDEO_DISABLED
jorgen@6866
   275
    if ((flags & SDL_INIT_VIDEO)) {
jorgen@6866
   276
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_VIDEO)) {
slouken@6690
   277
			SDL_VideoQuit();
slouken@6690
   278
		}
jorgen@6866
   279
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_VIDEO);
slouken@1895
   280
    }
slouken@0
   281
#endif
jorgen@6866
   282
slouken@6128
   283
#if !SDL_TIMERS_DISABLED
jorgen@6866
   284
    if ((flags & SDL_INIT_TIMER)) {
jorgen@6866
   285
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_TIMER)) {
slouken@6690
   286
			SDL_TimerQuit();
slouken@6690
   287
		}
jorgen@6866
   288
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_TIMER);
slouken@6128
   289
    }
slouken@6128
   290
#endif
slouken@0
   291
}
slouken@0
   292
slouken@1895
   293
Uint32
slouken@1895
   294
SDL_WasInit(Uint32 flags)
slouken@0
   295
{
jorgen@6866
   296
    int i;
jorgen@6866
   297
    int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
jorgen@6866
   298
    Uint32 initialized = 0;
jorgen@6866
   299
slouken@1895
   300
    if (!flags) {
slouken@1895
   301
        flags = SDL_INIT_EVERYTHING;
slouken@1895
   302
    }
jorgen@6866
   303
jorgen@6866
   304
    num_subsystems = SDL_min(num_subsystems, SDL_MostSignificantBitIndex32(flags) + 1);
jorgen@6866
   305
jorgen@6866
   306
    /* Iterate over each bit in flags, and check the matching subsystem. */
jorgen@6866
   307
    for (i = 0; i < num_subsystems; ++i) {
jorgen@6866
   308
        if ((flags & 1) && SDL_SubsystemRefCount[i] > 0) {
jorgen@6866
   309
            initialized |= (1 << i);
jorgen@6866
   310
        }
jorgen@6866
   311
jorgen@6866
   312
        flags >>= 1;
jorgen@6866
   313
    }
jorgen@6866
   314
jorgen@6866
   315
    return initialized;
slouken@0
   316
}
slouken@0
   317
slouken@1895
   318
void
slouken@1895
   319
SDL_Quit(void)
slouken@0
   320
{
jorgen@6866
   321
    SDL_bInMainQuit = SDL_TRUE;
jorgen@6866
   322
slouken@1895
   323
    /* Quit all subsystems */
slouken@5086
   324
#if defined(__WIN32__)
slouken@2713
   325
    SDL_HelperWindowDestroy();
slouken@2713
   326
#endif
slouken@1895
   327
    SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
slouken@0
   328
slouken@1895
   329
    /* Uninstall any parachute signal handlers */
slouken@1895
   330
    SDL_UninstallParachute();
slouken@397
   331
slouken@5189
   332
    SDL_ClearHints();
slouken@3647
   333
    SDL_AssertionsQuit();
slouken@5221
   334
    SDL_LogResetPriorities();
slouken@6690
   335
jorgen@6866
   336
    /* Now that every subsystem has been quit, we reset the subsystem refcount
jorgen@6866
   337
     * and the list of initialized subsystems.
jorgen@6866
   338
     */
jorgen@6866
   339
    SDL_memset( SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount) );
jorgen@6866
   340
jorgen@6866
   341
    SDL_bInMainQuit = SDL_FALSE;
slouken@0
   342
}
slouken@0
   343
slouken@1895
   344
/* Get the library version number */
slouken@1895
   345
void
slouken@1895
   346
SDL_GetVersion(SDL_version * ver)
slouken@0
   347
{
slouken@1895
   348
    SDL_VERSION(ver);
slouken@0
   349
}
slouken@0
   350
slouken@2982
   351
/* Get the library source revision */
icculus@4419
   352
const char *
slouken@2996
   353
SDL_GetRevision(void)
slouken@2982
   354
{
slouken@2983
   355
    return SDL_REVISION;
slouken@2982
   356
}
slouken@2982
   357
slouken@5359
   358
/* Get the library source revision number */
slouken@5359
   359
int
slouken@5359
   360
SDL_GetRevisionNumber(void)
slouken@5359
   361
{
slouken@5359
   362
    return SDL_REVISION_NUMBER;
slouken@5359
   363
}
slouken@5359
   364
slouken@3319
   365
/* Get the name of the platform */
slouken@3319
   366
const char *
slouken@3319
   367
SDL_GetPlatform()
slouken@3319
   368
{
slouken@3319
   369
#if __AIX__
slouken@3319
   370
    return "AIX";
slouken@6441
   371
#elif __ANDROID__
slouken@6441
   372
    return "Android";
slouken@3319
   373
#elif __HAIKU__
slouken@3319
   374
/* Haiku must appear here before BeOS, since it also defines __BEOS__ */
slouken@3319
   375
    return "Haiku";
slouken@3319
   376
#elif __BEOS__
slouken@3319
   377
    return "BeOS";
slouken@3319
   378
#elif __BSDI__
slouken@3319
   379
    return "BSDI";
slouken@3319
   380
#elif __DREAMCAST__
slouken@3319
   381
    return "Dreamcast";
slouken@3319
   382
#elif __FREEBSD__
slouken@3319
   383
    return "FreeBSD";
slouken@3319
   384
#elif __HPUX__
slouken@3319
   385
    return "HP-UX";
slouken@3319
   386
#elif __IRIX__
slouken@3319
   387
    return "Irix";
slouken@3319
   388
#elif __LINUX__
slouken@3319
   389
    return "Linux";
slouken@3319
   390
#elif __MINT__
slouken@3319
   391
    return "Atari MiNT";
slouken@3319
   392
#elif __MACOS__
slouken@3319
   393
    return "MacOS Classic";
slouken@3319
   394
#elif __MACOSX__
slouken@3319
   395
    return "Mac OS X";
slouken@3319
   396
#elif __NETBSD__
slouken@3319
   397
    return "NetBSD";
slouken@5270
   398
#elif __NDS__
slouken@5270
   399
    return "Nintendo DS";
slouken@3319
   400
#elif __OPENBSD__
slouken@3319
   401
    return "OpenBSD";
slouken@3319
   402
#elif __OS2__
slouken@3319
   403
    return "OS/2";
slouken@3319
   404
#elif __OSF__
slouken@3319
   405
    return "OSF/1";
slouken@3319
   406
#elif __QNXNTO__
slouken@3319
   407
    return "QNX Neutrino";
slouken@3319
   408
#elif __RISCOS__
slouken@3319
   409
    return "RISC OS";
slouken@3319
   410
#elif __SOLARIS__
slouken@3319
   411
    return "Solaris";
slouken@5086
   412
#elif __WIN32__
slouken@3319
   413
    return "Windows";
slouken@3319
   414
#elif __IPHONEOS__
slouken@3319
   415
    return "iPhone OS";
slouken@3319
   416
#else
slouken@3319
   417
    return "Unknown (see SDL_platform.h)";
slouken@3319
   418
#endif
slouken@3319
   419
}
slouken@3319
   420
slouken@5086
   421
#if defined(__WIN32__)
slouken@1330
   422
slouken@1465
   423
#if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
slouken@1465
   424
/* Need to include DllMain() on Watcom C for some reason.. */
slouken@5090
   425
#include "core/windows/SDL_windows.h"
slouken@1330
   426
slouken@1895
   427
BOOL APIENTRY
slouken@1895
   428
_DllMainCRTStartup(HANDLE hModule,
slouken@1895
   429
                   DWORD ul_reason_for_call, LPVOID lpReserved)
slouken@1330
   430
{
slouken@1895
   431
    switch (ul_reason_for_call) {
slouken@1895
   432
    case DLL_PROCESS_ATTACH:
slouken@1895
   433
    case DLL_THREAD_ATTACH:
slouken@1895
   434
    case DLL_THREAD_DETACH:
slouken@1895
   435
    case DLL_PROCESS_DETACH:
slouken@1895
   436
        break;
slouken@1895
   437
    }
slouken@1895
   438
    return TRUE;
slouken@1330
   439
}
slouken@1465
   440
#endif /* building DLL with Watcom C */
slouken@1330
   441
slouken@5086
   442
#endif /* __WIN32__ */
slouken@1895
   443
slouken@1895
   444
/* vi: set ts=4 sw=4 expandtab: */