Buckets:
| /* | |
| Simple DirectMedia Layer | |
| Copyright (C) 1997-2011 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. | |
| */ | |
| /** | |
| * \file SDL_stdinc.h | |
| * | |
| * This is a general header that includes C language support. | |
| */ | |
| /** | |
| * The number of elements in an array. | |
| */ | |
| /** | |
| * \name Cast operators | |
| * | |
| * Use proper C++ casts when compiled as C++ to be compatible with the option | |
| * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above). | |
| */ | |
| /*@{*/ | |
| /*@}*//*Cast operators*/ | |
| /* Define a four character code as a Uint32 */ | |
| /** | |
| * \name Basic data types | |
| */ | |
| /*@{*/ | |
| typedef enum | |
| { | |
| SDL_FALSE = 0, | |
| SDL_TRUE = 1 | |
| } SDL_bool; | |
| /** | |
| * \brief A signed 8-bit integer type. | |
| */ | |
| typedef int8_t Sint8; | |
| /** | |
| * \brief An unsigned 8-bit integer type. | |
| */ | |
| typedef uint8_t Uint8; | |
| /** | |
| * \brief A signed 16-bit integer type. | |
| */ | |
| typedef int16_t Sint16; | |
| /** | |
| * \brief An unsigned 16-bit integer type. | |
| */ | |
| typedef uint16_t Uint16; | |
| /** | |
| * \brief A signed 32-bit integer type. | |
| */ | |
| typedef int32_t Sint32; | |
| /** | |
| * \brief An unsigned 32-bit integer type. | |
| */ | |
| typedef uint32_t Uint32; | |
| /** | |
| * \brief A signed 64-bit integer type. | |
| */ | |
| typedef int64_t Sint64; | |
| /** | |
| * \brief An unsigned 64-bit integer type. | |
| */ | |
| typedef uint64_t Uint64; | |
| /*@}*//*Basic data types*/ | |
| /** \cond */ | |
| SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); | |
| SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); | |
| SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); | |
| SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); | |
| SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); | |
| SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); | |
| SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); | |
| SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); | |
| /** \endcond */ | |
| /* Check to make sure enums are the size of ints, for structure packing. | |
| For both Watcom C/C++ and Borland C/C++ the compiler option that makes | |
| enums having the size of an int must be enabled. | |
| This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11). | |
| */ | |
| /* Enable enums always int in CodeWarrior (for MPW use "-enum int") */ | |
| /** \cond */ | |
| /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */ | |
| typedef enum | |
| { | |
| DUMMY_ENUM_VALUE | |
| } SDL_DUMMY_ENUM; | |
| SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); | |
| /** \endcond */ | |
| /* Set up for C function definitions, even when using C++ */ | |
| /* *INDENT-OFF* */ | |
| extern "C" { | |
| /* *INDENT-ON* */ | |
| extern DECLSPEC void *SDLCALL SDL_malloc(size_t size); | |
| extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size); | |
| extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size); | |
| extern DECLSPEC void SDLCALL SDL_free(void *mem); | |
| void *alloca(unsigned); | |
| char *alloca(); | |
| extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); | |
| /* SDL_putenv() has moved to SDL_compat. */ | |
| extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, | |
| int overwrite); | |
| extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, | |
| int (*compare) (const void *, | |
| const void *)); | |
| extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len); | |
| /* We can count on memcpy existing on Mac OS X and being well-tuned. */ | |
| extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, | |
| size_t len); | |
| /* We can count on memcpy existing on Mac OS X and being well-tuned. */ | |
| extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, | |
| size_t len); | |
| extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, | |
| size_t len); | |
| extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string); | |
| extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t * string); | |
| extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen); | |
| extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen); | |
| extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, | |
| size_t maxlen); | |
| extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, | |
| size_t dst_bytes); | |
| extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, | |
| size_t maxlen); | |
| extern DECLSPEC char *SDLCALL SDL_strdup(const char *string); | |
| extern DECLSPEC char *SDLCALL SDL_strrev(char *string); | |
| extern DECLSPEC char *SDLCALL SDL_strupr(char *string); | |
| extern DECLSPEC char *SDLCALL SDL_strlwr(char *string); | |
| extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c); | |
| extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c); | |
| extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, | |
| const char *needle); | |
| extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix); | |
| extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string, | |
| int radix); | |
| extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, | |
| int base); | |
| extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string, | |
| char **endp, int base); | |
| extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string, | |
| int radix); | |
| extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string, | |
| int radix); | |
| extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, | |
| int base); | |
| extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, | |
| int base); | |
| extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp); | |
| extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); | |
| extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, | |
| size_t maxlen); | |
| extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, | |
| const char *str2); | |
| extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, | |
| const char *str2, size_t maxlen); | |
| extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, | |
| ...); | |
| extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, | |
| const char *fmt, ...); | |
| extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, | |
| const char *fmt, va_list ap); | |
| extern DECLSPEC double SDLCALL SDL_atan(double x); | |
| extern DECLSPEC double SDLCALL SDL_atan2(double y, double x); | |
| extern DECLSPEC double SDLCALL SDL_copysign(double x, double y); | |
| extern DECLSPEC double SDLCALL SDL_cos(double x); | |
| extern DECLSPEC double SDLCALL SDL_fabs(double x); | |
| extern DECLSPEC double SDLCALL SDL_floor(double x); | |
| extern DECLSPEC double SDLCALL SDL_log(double x); | |
| extern DECLSPEC double SDLCALL SDL_pow(double x, double y); | |
| extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n); | |
| extern DECLSPEC double SDLCALL SDL_sin(double x); | |
| extern DECLSPEC double SDLCALL SDL_sqrt(double x); | |
| /* The SDL implementation of iconv() returns these error codes */ | |
| typedef struct _SDL_iconv_t *SDL_iconv_t; | |
| extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, | |
| const char *fromcode); | |
| extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd); | |
| extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, | |
| size_t * inbytesleft, char **outbuf, | |
| size_t * outbytesleft); | |
| /** | |
| * This function converts a string between encodings in one pass, returning a | |
| * string that must be freed with SDL_free() or NULL on error. | |
| */ | |
| extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, | |
| const char *fromcode, | |
| const char *inbuf, | |
| size_t inbytesleft); | |
| /* Ends C function definitions when using C++ */ | |
| /* *INDENT-OFF* */ | |
| } | |
| /* *INDENT-ON* */ | |
| /* vi: set ts=4 sw=4 expandtab: */ | |
Xet Storage Details
- Size:
- 20.3 kB
- Xet hash:
- 4a9416df1f2733be97682c7746625d2f07067f702d4c5c90068a9bcb18fd4c73
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.