Mercurial > sdl-ios-xcode
diff include/SDL_stdinc.h @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children | 3695d3637045 |
line wrap: on
line diff
--- a/include/SDL_stdinc.h Mon May 29 03:53:21 2006 +0000 +++ b/include/SDL_stdinc.h Mon May 29 04:04:35 2006 +0000 @@ -141,14 +141,14 @@ #define SDL_COMPILE_TIME_ASSERT(name, x) \ typedef int SDL_dummy_ ## name[(x) * 2 - 1] #ifndef DOXYGEN_SHOULD_IGNORE_THIS -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); +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); #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ /* Check to make sure enums are the size of ints, for structure packing. @@ -167,7 +167,7 @@ DUMMY_ENUM_VALUE } SDL_DUMMY_ENUM; -SDL_COMPILE_TIME_ASSERT (enum, sizeof (SDL_DUMMY_ENUM) == sizeof (int)); +SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ #include "begin_code.h" @@ -181,25 +181,25 @@ #ifdef HAVE_MALLOC #define SDL_malloc malloc #else -extern DECLSPEC void *SDLCALL SDL_malloc (size_t size); +extern DECLSPEC void *SDLCALL SDL_malloc(size_t size); #endif #ifdef HAVE_CALLOC #define SDL_calloc calloc #else -extern DECLSPEC void *SDLCALL SDL_calloc (size_t nmemb, size_t size); +extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size); #endif #ifdef HAVE_REALLOC #define SDL_realloc realloc #else -extern DECLSPEC void *SDLCALL SDL_realloc (void *mem, size_t size); +extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size); #endif #ifdef HAVE_FREE #define SDL_free free #else -extern DECLSPEC void SDLCALL SDL_free (void *mem); +extern DECLSPEC void SDLCALL SDL_free(void *mem); #endif #if defined(HAVE_ALLOCA) && !defined(alloca) @@ -215,9 +215,9 @@ # elif defined(__AIX__) #pragma alloca # elif defined(__MRC__) -void *alloca (unsigned); +void *alloca(unsigned); # else -char *alloca (); +char *alloca(); # endif #endif #ifdef HAVE_ALLOCA @@ -231,21 +231,21 @@ #ifdef HAVE_GETENV #define SDL_getenv getenv #else -extern DECLSPEC char *SDLCALL SDL_getenv (const char *name); +extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); #endif #ifdef HAVE_PUTENV #define SDL_putenv putenv #else -extern DECLSPEC int SDLCALL SDL_putenv (const char *variable); +extern DECLSPEC int SDLCALL SDL_putenv(const char *variable); #endif #ifdef HAVE_QSORT #define SDL_qsort qsort #else -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_qsort(void *base, size_t nmemb, size_t size, + int (*compare) (const void *, + const void *)); #endif #ifdef HAVE_ABS @@ -272,7 +272,7 @@ #ifdef HAVE_MEMSET #define SDL_memset memset #else -extern DECLSPEC void *SDLCALL SDL_memset (void *dst, int c, size_t len); +extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len); #endif #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x))) @@ -331,8 +331,8 @@ #elif defined(HAVE_BCOPY) #define SDL_memcpy(d, s, n) bcopy((s), (d), (n)) #else -extern DECLSPEC void *SDLCALL SDL_memcpy (void *dst, const void *src, - size_t len); +extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, + size_t len); #endif #endif @@ -379,8 +379,8 @@ } while(0) #endif #ifndef SDL_revcpy -extern DECLSPEC void *SDLCALL SDL_revcpy (void *dst, const void *src, - size_t len); +extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src, + size_t len); #endif #ifdef HAVE_MEMMOVE @@ -401,52 +401,52 @@ #ifdef HAVE_MEMCMP #define SDL_memcmp memcmp #else -extern DECLSPEC int SDLCALL SDL_memcmp (const void *s1, const void *s2, - size_t len); +extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, + size_t len); #endif #ifdef HAVE_STRLEN #define SDL_strlen strlen #else -extern DECLSPEC size_t SDLCALL SDL_strlen (const char *string); +extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string); #endif #ifdef HAVE_STRLCPY #define SDL_strlcpy strlcpy #else -extern DECLSPEC size_t SDLCALL SDL_strlcpy (char *dst, const char *src, - size_t maxlen); +extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, + size_t maxlen); #endif #ifdef HAVE_STRLCAT #define SDL_strlcat strlcat #else -extern DECLSPEC size_t SDLCALL SDL_strlcat (char *dst, const char *src, - size_t maxlen); +extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, + size_t maxlen); #endif #ifdef HAVE_STRDUP #define SDL_strdup strdup #else -extern DECLSPEC char *SDLCALL SDL_strdup (const char *string); +extern DECLSPEC char *SDLCALL SDL_strdup(const char *string); #endif #ifdef HAVE__STRREV #define SDL_strrev _strrev #else -extern DECLSPEC char *SDLCALL SDL_strrev (char *string); +extern DECLSPEC char *SDLCALL SDL_strrev(char *string); #endif #ifdef HAVE__STRUPR #define SDL_strupr _strupr #else -extern DECLSPEC char *SDLCALL SDL_strupr (char *string); +extern DECLSPEC char *SDLCALL SDL_strupr(char *string); #endif #ifdef HAVE__STRLWR #define SDL_strlwr _strlwr #else -extern DECLSPEC char *SDLCALL SDL_strlwr (char *string); +extern DECLSPEC char *SDLCALL SDL_strlwr(char *string); #endif #ifdef HAVE_STRCHR @@ -454,7 +454,7 @@ #elif defined(HAVE_INDEX) #define SDL_strchr index #else -extern DECLSPEC char *SDLCALL SDL_strchr (const char *string, int c); +extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c); #endif #ifdef HAVE_STRRCHR @@ -462,14 +462,14 @@ #elif defined(HAVE_RINDEX) #define SDL_strrchr rindex #else -extern DECLSPEC char *SDLCALL SDL_strrchr (const char *string, int c); +extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c); #endif #ifdef HAVE_STRSTR #define SDL_strstr strstr #else -extern DECLSPEC char *SDLCALL SDL_strstr (const char *haystack, - const char *needle); +extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, + const char *needle); #endif #ifdef HAVE_ITOA @@ -481,7 +481,7 @@ #ifdef HAVE__LTOA #define SDL_ltoa _ltoa #else -extern DECLSPEC char *SDLCALL SDL_ltoa (long value, char *string, int radix); +extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix); #endif #ifdef HAVE__UITOA @@ -493,22 +493,22 @@ #ifdef HAVE__ULTOA #define SDL_ultoa _ultoa #else -extern DECLSPEC char *SDLCALL SDL_ultoa (unsigned long value, char *string, - int radix); +extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string, + int radix); #endif #ifdef HAVE_STRTOL #define SDL_strtol strtol #else -extern DECLSPEC long SDLCALL SDL_strtol (const char *string, char **endp, - int base); +extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, + int base); #endif #ifdef HAVE_STRTOUL #define SDL_strtoul strtoul #else -extern DECLSPEC unsigned long SDLCALL SDL_strtoul (const char *string, - char **endp, int base); +extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string, + char **endp, int base); #endif #ifdef SDL_HAS_64BIT_TYPE @@ -516,29 +516,29 @@ #ifdef HAVE__I64TOA #define SDL_lltoa _i64toa #else -extern DECLSPEC char *SDLCALL SDL_lltoa (Sint64 value, char *string, - int radix); +extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string, + int radix); #endif #ifdef HAVE__UI64TOA #define SDL_ulltoa _ui64toa #else -extern DECLSPEC char *SDLCALL SDL_ulltoa (Uint64 value, char *string, - int radix); +extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string, + int radix); #endif #ifdef HAVE_STRTOLL #define SDL_strtoll strtoll #else -extern DECLSPEC Sint64 SDLCALL SDL_strtoll (const char *string, char **endp, - int base); +extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, + int base); #endif #ifdef HAVE_STRTOULL #define SDL_strtoull strtoull #else -extern DECLSPEC Uint64 SDLCALL SDL_strtoull (const char *string, char **endp, - int base); +extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, + int base); #endif #endif /* SDL_HAS_64BIT_TYPE */ @@ -546,7 +546,7 @@ #ifdef HAVE_STRTOD #define SDL_strtod strtod #else -extern DECLSPEC double SDLCALL SDL_strtod (const char *string, char **endp); +extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp); #endif #ifdef HAVE_ATOI @@ -564,14 +564,14 @@ #ifdef HAVE_STRCMP #define SDL_strcmp strcmp #else -extern DECLSPEC int SDLCALL SDL_strcmp (const char *str1, const char *str2); +extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); #endif #ifdef HAVE_STRNCMP #define SDL_strncmp strncmp #else -extern DECLSPEC int SDLCALL SDL_strncmp (const char *str1, const char *str2, - size_t maxlen); +extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, + size_t maxlen); #endif #ifdef HAVE_STRCASECMP @@ -579,8 +579,8 @@ #elif defined(HAVE__STRICMP) #define SDL_strcasecmp _stricmp #else -extern DECLSPEC int SDLCALL SDL_strcasecmp (const char *str1, - const char *str2); +extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, + const char *str2); #endif #ifdef HAVE_STRNCASECMP @@ -588,29 +588,29 @@ #elif defined(HAVE__STRNICMP) #define SDL_strncasecmp _strnicmp #else -extern DECLSPEC int SDLCALL SDL_strncasecmp (const char *str1, - const char *str2, size_t maxlen); +extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, + const char *str2, size_t maxlen); #endif #ifdef HAVE_SSCANF #define SDL_sscanf sscanf #else -extern DECLSPEC int SDLCALL SDL_sscanf (const char *text, const char *fmt, - ...); +extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, + ...); #endif #ifdef HAVE_SNPRINTF #define SDL_snprintf snprintf #else -extern DECLSPEC int SDLCALL SDL_snprintf (char *text, size_t maxlen, - const char *fmt, ...); +extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, + const char *fmt, ...); #endif #ifdef HAVE_VSNPRINTF #define SDL_vsnprintf vsnprintf #else -extern DECLSPEC int SDLCALL SDL_vsnprintf (char *text, size_t maxlen, - const char *fmt, va_list ap); +extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, + const char *fmt, va_list ap); #endif /* The SDL implementation of iconv() returns these error codes */ @@ -623,25 +623,25 @@ #define SDL_iconv_t iconv_t #define SDL_iconv_open iconv_open #define SDL_iconv_close iconv_close -extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf, - size_t * inbytesleft, char **outbuf, - size_t * outbytesleft); +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, + size_t * inbytesleft, char **outbuf, + size_t * outbytesleft); #else 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, char **inbuf, - size_t * inbytesleft, char **outbuf, - size_t * outbytesleft); +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, char **inbuf, + size_t * inbytesleft, char **outbuf, + size_t * outbytesleft); #endif /* 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, - char *inbuf, - size_t inbytesleft); +extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, + const char *fromcode, + char *inbuf, + size_t inbytesleft); #define SDL_iconv_utf8_ascii(S) SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1) #define SDL_iconv_utf8_latin1(S) SDL_iconv_string("LATIN1", "UTF-8", S, SDL_strlen(S)+1) #define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)