misc/winutils/include/SDL_version.h
author Wuzzy <almikes@aol.com>
Tue, 26 Sep 2017 05:09:33 +0200
changeset 12535 baee67bfa5c2
parent 10017 de822cd3df3a
permissions -rw-r--r--
ASA, the final battle: Fix mission panel not appearing if you watched the dialog
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     1
/*
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     2
    SDL - Simple DirectMedia Layer
7809
7d4fb2f35f4f update SDL headers for winutils
koda
parents: 6560
diff changeset
     3
    Copyright (C) 1997-2012 Sam Lantinga
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     4
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     5
    This library is free software; you can redistribute it and/or
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     6
    modify it under the terms of the GNU Lesser General Public
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     7
    License as published by the Free Software Foundation; either
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     8
    version 2.1 of the License, or (at your option) any later version.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     9
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    10
    This library is distributed in the hope that it will be useful,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    13
    Lesser General Public License for more details.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    14
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    15
    You should have received a copy of the GNU Lesser General Public
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    16
    License along with this library; if not, write to the Free Software
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    18
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    19
    Sam Lantinga
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    20
    slouken@libsdl.org
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    21
*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    22
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    23
/** @file SDL_version.h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    24
 *  This header defines the current SDL version
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    25
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    26
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    27
#ifndef _SDL_version_h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    28
#define _SDL_version_h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    29
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    30
#include "SDL_stdinc.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    31
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    32
#include "begin_code.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    33
/* Set up for C function definitions, even when using C++ */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    34
#ifdef __cplusplus
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    35
extern "C" {
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    36
#endif
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    37
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    38
/** @name Version Number
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    39
 *  Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    40
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    41
/*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    42
#define SDL_MAJOR_VERSION   1
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    43
#define SDL_MINOR_VERSION   2
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    44
#define SDL_PATCHLEVEL      15
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    45
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    46
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    47
typedef struct SDL_version {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    48
    Uint8 major;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    49
    Uint8 minor;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    50
    Uint8 patch;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    51
} SDL_version;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    52
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    53
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    54
 * This macro can be used to fill a version structure with the compile-time
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    55
 * version of the SDL library.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    56
 */
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    57
#define SDL_VERSION(X)                          \
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    58
{                                   \
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    59
    (X)->major = SDL_MAJOR_VERSION;                 \
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    60
    (X)->minor = SDL_MINOR_VERSION;                 \
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    61
    (X)->patch = SDL_PATCHLEVEL;                    \
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    62
}
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    63
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    64
/** This macro turns the version numbers into a numeric value:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    65
 *  (1,2,3) -> (1203)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    66
 *  This assumes that there will never be more than 100 patchlevels
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    67
 */
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    68
#define SDL_VERSIONNUM(X, Y, Z)                     \
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    69
    ((X)*1000 + (Y)*100 + (Z))
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    70
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    71
/** This is the version number macro for the current SDL version */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    72
#define SDL_COMPILEDVERSION \
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    73
    SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    74
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    75
/** This macro will evaluate to true if compiled with SDL at least X.Y.Z */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    76
#define SDL_VERSION_ATLEAST(X, Y, Z) \
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    77
    (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    78
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    79
/** This function gets the version of the dynamically linked SDL library.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    80
 *  it should NOT be used to fill a version structure, instead you should
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    81
 *  use the SDL_Version() macro.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    82
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    83
extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    84
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    85
/* Ends C function definitions when using C++ */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    86
#ifdef __cplusplus
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    87
}
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    88
#endif
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    89
#include "close_code.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    90
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    91
#endif /* _SDL_version_h */