misc/winutils/include/SDL_version.h
author koda
Wed, 02 May 2012 08:07:17 +0100
changeset 6986 409dd3851309
parent 6560 ca07e6be08d0
child 7809 7d4fb2f35f4f
permissions -rw-r--r--
add support for default pascal mode by removing default arguments value (maybe this also helps the parser)
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
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     3
    Copyright (C) 1997-2009 Sam Lantinga
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
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    42
#define SDL_MAJOR_VERSION	1
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    43
#define SDL_MINOR_VERSION	2
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    44
#define SDL_PATCHLEVEL		14
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 {
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    48
	Uint8 major;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    49
	Uint8 minor;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    50
	Uint8 patch;
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
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    57
#define SDL_VERSION(X)							\
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    58
{									\
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    59
	(X)->major = SDL_MAJOR_VERSION;					\
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    60
	(X)->minor = SDL_MINOR_VERSION;					\
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    61
	(X)->patch = SDL_PATCHLEVEL;					\
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
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    68
#define SDL_VERSIONNUM(X, Y, Z)						\
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    69
	((X)*1000 + (Y)*100 + (Z))
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 \
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    73
	SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
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) \
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    77
	(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
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 */