include/SDL_stdinc.h
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
child 1696 3695d3637045
     1.1 --- a/include/SDL_stdinc.h	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/include/SDL_stdinc.h	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -141,14 +141,14 @@
     1.4  #define SDL_COMPILE_TIME_ASSERT(name, x)               \
     1.5         typedef int SDL_dummy_ ## name[(x) * 2 - 1]
     1.6  #ifndef DOXYGEN_SHOULD_IGNORE_THIS
     1.7 -SDL_COMPILE_TIME_ASSERT (uint8, sizeof (Uint8) == 1);
     1.8 -SDL_COMPILE_TIME_ASSERT (sint8, sizeof (Sint8) == 1);
     1.9 -SDL_COMPILE_TIME_ASSERT (uint16, sizeof (Uint16) == 2);
    1.10 -SDL_COMPILE_TIME_ASSERT (sint16, sizeof (Sint16) == 2);
    1.11 -SDL_COMPILE_TIME_ASSERT (uint32, sizeof (Uint32) == 4);
    1.12 -SDL_COMPILE_TIME_ASSERT (sint32, sizeof (Sint32) == 4);
    1.13 -SDL_COMPILE_TIME_ASSERT (uint64, sizeof (Uint64) == 8);
    1.14 -SDL_COMPILE_TIME_ASSERT (sint64, sizeof (Sint64) == 8);
    1.15 +SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
    1.16 +SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
    1.17 +SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
    1.18 +SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
    1.19 +SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
    1.20 +SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
    1.21 +SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
    1.22 +SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
    1.23  #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
    1.24  
    1.25  /* Check to make sure enums are the size of ints, for structure packing.
    1.26 @@ -167,7 +167,7 @@
    1.27      DUMMY_ENUM_VALUE
    1.28  } SDL_DUMMY_ENUM;
    1.29  
    1.30 -SDL_COMPILE_TIME_ASSERT (enum, sizeof (SDL_DUMMY_ENUM) == sizeof (int));
    1.31 +SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
    1.32  #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
    1.33  
    1.34  #include "begin_code.h"
    1.35 @@ -181,25 +181,25 @@
    1.36  #ifdef HAVE_MALLOC
    1.37  #define SDL_malloc	malloc
    1.38  #else
    1.39 -extern DECLSPEC void *SDLCALL SDL_malloc (size_t size);
    1.40 +extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
    1.41  #endif
    1.42  
    1.43  #ifdef HAVE_CALLOC
    1.44  #define SDL_calloc	calloc
    1.45  #else
    1.46 -extern DECLSPEC void *SDLCALL SDL_calloc (size_t nmemb, size_t size);
    1.47 +extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
    1.48  #endif
    1.49  
    1.50  #ifdef HAVE_REALLOC
    1.51  #define SDL_realloc	realloc
    1.52  #else
    1.53 -extern DECLSPEC void *SDLCALL SDL_realloc (void *mem, size_t size);
    1.54 +extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
    1.55  #endif
    1.56  
    1.57  #ifdef HAVE_FREE
    1.58  #define SDL_free	free
    1.59  #else
    1.60 -extern DECLSPEC void SDLCALL SDL_free (void *mem);
    1.61 +extern DECLSPEC void SDLCALL SDL_free(void *mem);
    1.62  #endif
    1.63  
    1.64  #if defined(HAVE_ALLOCA) && !defined(alloca)
    1.65 @@ -215,9 +215,9 @@
    1.66  # elif defined(__AIX__)
    1.67  #pragma alloca
    1.68  # elif defined(__MRC__)
    1.69 -void *alloca (unsigned);
    1.70 +void *alloca(unsigned);
    1.71  # else
    1.72 -char *alloca ();
    1.73 +char *alloca();
    1.74  # endif
    1.75  #endif
    1.76  #ifdef HAVE_ALLOCA
    1.77 @@ -231,21 +231,21 @@
    1.78  #ifdef HAVE_GETENV
    1.79  #define SDL_getenv	getenv
    1.80  #else
    1.81 -extern DECLSPEC char *SDLCALL SDL_getenv (const char *name);
    1.82 +extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
    1.83  #endif
    1.84  
    1.85  #ifdef HAVE_PUTENV
    1.86  #define SDL_putenv	putenv
    1.87  #else
    1.88 -extern DECLSPEC int SDLCALL SDL_putenv (const char *variable);
    1.89 +extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
    1.90  #endif
    1.91  
    1.92  #ifdef HAVE_QSORT
    1.93  #define SDL_qsort	qsort
    1.94  #else
    1.95 -extern DECLSPEC void SDLCALL SDL_qsort (void *base, size_t nmemb, size_t size,
    1.96 -                                        int (*compare) (const void *,
    1.97 -                                                        const void *));
    1.98 +extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
    1.99 +                                       int (*compare) (const void *,
   1.100 +                                                       const void *));
   1.101  #endif
   1.102  
   1.103  #ifdef HAVE_ABS
   1.104 @@ -272,7 +272,7 @@
   1.105  #ifdef HAVE_MEMSET
   1.106  #define SDL_memset      memset
   1.107  #else
   1.108 -extern DECLSPEC void *SDLCALL SDL_memset (void *dst, int c, size_t len);
   1.109 +extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
   1.110  #endif
   1.111  #define SDL_zero(x)	SDL_memset(&(x), 0, sizeof((x)))
   1.112  #define SDL_zerop(x)	SDL_memset((x), 0, sizeof(*(x)))
   1.113 @@ -331,8 +331,8 @@
   1.114  #elif defined(HAVE_BCOPY)
   1.115  #define SDL_memcpy(d, s, n)	bcopy((s), (d), (n))
   1.116  #else
   1.117 -extern DECLSPEC void *SDLCALL SDL_memcpy (void *dst, const void *src,
   1.118 -                                          size_t len);
   1.119 +extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src,
   1.120 +                                         size_t len);
   1.121  #endif
   1.122  #endif
   1.123  
   1.124 @@ -379,8 +379,8 @@
   1.125  } while(0)
   1.126  #endif
   1.127  #ifndef SDL_revcpy
   1.128 -extern DECLSPEC void *SDLCALL SDL_revcpy (void *dst, const void *src,
   1.129 -                                          size_t len);
   1.130 +extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src,
   1.131 +                                         size_t len);
   1.132  #endif
   1.133  
   1.134  #ifdef HAVE_MEMMOVE
   1.135 @@ -401,52 +401,52 @@
   1.136  #ifdef HAVE_MEMCMP
   1.137  #define SDL_memcmp      memcmp
   1.138  #else
   1.139 -extern DECLSPEC int SDLCALL SDL_memcmp (const void *s1, const void *s2,
   1.140 -                                        size_t len);
   1.141 +extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2,
   1.142 +                                       size_t len);
   1.143  #endif
   1.144  
   1.145  #ifdef HAVE_STRLEN
   1.146  #define SDL_strlen      strlen
   1.147  #else
   1.148 -extern DECLSPEC size_t SDLCALL SDL_strlen (const char *string);
   1.149 +extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);
   1.150  #endif
   1.151  
   1.152  #ifdef HAVE_STRLCPY
   1.153  #define SDL_strlcpy     strlcpy
   1.154  #else
   1.155 -extern DECLSPEC size_t SDLCALL SDL_strlcpy (char *dst, const char *src,
   1.156 -                                            size_t maxlen);
   1.157 +extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src,
   1.158 +                                           size_t maxlen);
   1.159  #endif
   1.160  
   1.161  #ifdef HAVE_STRLCAT
   1.162  #define SDL_strlcat    strlcat
   1.163  #else
   1.164 -extern DECLSPEC size_t SDLCALL SDL_strlcat (char *dst, const char *src,
   1.165 -                                            size_t maxlen);
   1.166 +extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src,
   1.167 +                                           size_t maxlen);
   1.168  #endif
   1.169  
   1.170  #ifdef HAVE_STRDUP
   1.171  #define SDL_strdup     strdup
   1.172  #else
   1.173 -extern DECLSPEC char *SDLCALL SDL_strdup (const char *string);
   1.174 +extern DECLSPEC char *SDLCALL SDL_strdup(const char *string);
   1.175  #endif
   1.176  
   1.177  #ifdef HAVE__STRREV
   1.178  #define SDL_strrev      _strrev
   1.179  #else
   1.180 -extern DECLSPEC char *SDLCALL SDL_strrev (char *string);
   1.181 +extern DECLSPEC char *SDLCALL SDL_strrev(char *string);
   1.182  #endif
   1.183  
   1.184  #ifdef HAVE__STRUPR
   1.185  #define SDL_strupr      _strupr
   1.186  #else
   1.187 -extern DECLSPEC char *SDLCALL SDL_strupr (char *string);
   1.188 +extern DECLSPEC char *SDLCALL SDL_strupr(char *string);
   1.189  #endif
   1.190  
   1.191  #ifdef HAVE__STRLWR
   1.192  #define SDL_strlwr      _strlwr
   1.193  #else
   1.194 -extern DECLSPEC char *SDLCALL SDL_strlwr (char *string);
   1.195 +extern DECLSPEC char *SDLCALL SDL_strlwr(char *string);
   1.196  #endif
   1.197  
   1.198  #ifdef HAVE_STRCHR
   1.199 @@ -454,7 +454,7 @@
   1.200  #elif defined(HAVE_INDEX)
   1.201  #define SDL_strchr      index
   1.202  #else
   1.203 -extern DECLSPEC char *SDLCALL SDL_strchr (const char *string, int c);
   1.204 +extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c);
   1.205  #endif
   1.206  
   1.207  #ifdef HAVE_STRRCHR
   1.208 @@ -462,14 +462,14 @@
   1.209  #elif defined(HAVE_RINDEX)
   1.210  #define SDL_strrchr     rindex
   1.211  #else
   1.212 -extern DECLSPEC char *SDLCALL SDL_strrchr (const char *string, int c);
   1.213 +extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c);
   1.214  #endif
   1.215  
   1.216  #ifdef HAVE_STRSTR
   1.217  #define SDL_strstr      strstr
   1.218  #else
   1.219 -extern DECLSPEC char *SDLCALL SDL_strstr (const char *haystack,
   1.220 -                                          const char *needle);
   1.221 +extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack,
   1.222 +                                         const char *needle);
   1.223  #endif
   1.224  
   1.225  #ifdef HAVE_ITOA
   1.226 @@ -481,7 +481,7 @@
   1.227  #ifdef HAVE__LTOA
   1.228  #define SDL_ltoa        _ltoa
   1.229  #else
   1.230 -extern DECLSPEC char *SDLCALL SDL_ltoa (long value, char *string, int radix);
   1.231 +extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix);
   1.232  #endif
   1.233  
   1.234  #ifdef HAVE__UITOA
   1.235 @@ -493,22 +493,22 @@
   1.236  #ifdef HAVE__ULTOA
   1.237  #define SDL_ultoa       _ultoa
   1.238  #else
   1.239 -extern DECLSPEC char *SDLCALL SDL_ultoa (unsigned long value, char *string,
   1.240 -                                         int radix);
   1.241 +extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string,
   1.242 +                                        int radix);
   1.243  #endif
   1.244  
   1.245  #ifdef HAVE_STRTOL
   1.246  #define SDL_strtol      strtol
   1.247  #else
   1.248 -extern DECLSPEC long SDLCALL SDL_strtol (const char *string, char **endp,
   1.249 -                                         int base);
   1.250 +extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp,
   1.251 +                                        int base);
   1.252  #endif
   1.253  
   1.254  #ifdef HAVE_STRTOUL
   1.255  #define SDL_strtoul      strtoul
   1.256  #else
   1.257 -extern DECLSPEC unsigned long SDLCALL SDL_strtoul (const char *string,
   1.258 -                                                   char **endp, int base);
   1.259 +extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string,
   1.260 +                                                  char **endp, int base);
   1.261  #endif
   1.262  
   1.263  #ifdef SDL_HAS_64BIT_TYPE
   1.264 @@ -516,29 +516,29 @@
   1.265  #ifdef HAVE__I64TOA
   1.266  #define SDL_lltoa       _i64toa
   1.267  #else
   1.268 -extern DECLSPEC char *SDLCALL SDL_lltoa (Sint64 value, char *string,
   1.269 -                                         int radix);
   1.270 +extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string,
   1.271 +                                        int radix);
   1.272  #endif
   1.273  
   1.274  #ifdef HAVE__UI64TOA
   1.275  #define SDL_ulltoa      _ui64toa
   1.276  #else
   1.277 -extern DECLSPEC char *SDLCALL SDL_ulltoa (Uint64 value, char *string,
   1.278 -                                          int radix);
   1.279 +extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string,
   1.280 +                                         int radix);
   1.281  #endif
   1.282  
   1.283  #ifdef HAVE_STRTOLL
   1.284  #define SDL_strtoll     strtoll
   1.285  #else
   1.286 -extern DECLSPEC Sint64 SDLCALL SDL_strtoll (const char *string, char **endp,
   1.287 -                                            int base);
   1.288 +extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp,
   1.289 +                                           int base);
   1.290  #endif
   1.291  
   1.292  #ifdef HAVE_STRTOULL
   1.293  #define SDL_strtoull     strtoull
   1.294  #else
   1.295 -extern DECLSPEC Uint64 SDLCALL SDL_strtoull (const char *string, char **endp,
   1.296 -                                             int base);
   1.297 +extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp,
   1.298 +                                            int base);
   1.299  #endif
   1.300  
   1.301  #endif /* SDL_HAS_64BIT_TYPE */
   1.302 @@ -546,7 +546,7 @@
   1.303  #ifdef HAVE_STRTOD
   1.304  #define SDL_strtod      strtod
   1.305  #else
   1.306 -extern DECLSPEC double SDLCALL SDL_strtod (const char *string, char **endp);
   1.307 +extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);
   1.308  #endif
   1.309  
   1.310  #ifdef HAVE_ATOI
   1.311 @@ -564,14 +564,14 @@
   1.312  #ifdef HAVE_STRCMP
   1.313  #define SDL_strcmp      strcmp
   1.314  #else
   1.315 -extern DECLSPEC int SDLCALL SDL_strcmp (const char *str1, const char *str2);
   1.316 +extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
   1.317  #endif
   1.318  
   1.319  #ifdef HAVE_STRNCMP
   1.320  #define SDL_strncmp     strncmp
   1.321  #else
   1.322 -extern DECLSPEC int SDLCALL SDL_strncmp (const char *str1, const char *str2,
   1.323 -                                         size_t maxlen);
   1.324 +extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2,
   1.325 +                                        size_t maxlen);
   1.326  #endif
   1.327  
   1.328  #ifdef HAVE_STRCASECMP
   1.329 @@ -579,8 +579,8 @@
   1.330  #elif defined(HAVE__STRICMP)
   1.331  #define SDL_strcasecmp  _stricmp
   1.332  #else
   1.333 -extern DECLSPEC int SDLCALL SDL_strcasecmp (const char *str1,
   1.334 -                                            const char *str2);
   1.335 +extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1,
   1.336 +                                           const char *str2);
   1.337  #endif
   1.338  
   1.339  #ifdef HAVE_STRNCASECMP
   1.340 @@ -588,29 +588,29 @@
   1.341  #elif defined(HAVE__STRNICMP)
   1.342  #define SDL_strncasecmp _strnicmp
   1.343  #else
   1.344 -extern DECLSPEC int SDLCALL SDL_strncasecmp (const char *str1,
   1.345 -                                             const char *str2, size_t maxlen);
   1.346 +extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1,
   1.347 +                                            const char *str2, size_t maxlen);
   1.348  #endif
   1.349  
   1.350  #ifdef HAVE_SSCANF
   1.351  #define SDL_sscanf      sscanf
   1.352  #else
   1.353 -extern DECLSPEC int SDLCALL SDL_sscanf (const char *text, const char *fmt,
   1.354 -                                        ...);
   1.355 +extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt,
   1.356 +                                       ...);
   1.357  #endif
   1.358  
   1.359  #ifdef HAVE_SNPRINTF
   1.360  #define SDL_snprintf    snprintf
   1.361  #else
   1.362 -extern DECLSPEC int SDLCALL SDL_snprintf (char *text, size_t maxlen,
   1.363 -                                          const char *fmt, ...);
   1.364 +extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen,
   1.365 +                                         const char *fmt, ...);
   1.366  #endif
   1.367  
   1.368  #ifdef HAVE_VSNPRINTF
   1.369  #define SDL_vsnprintf   vsnprintf
   1.370  #else
   1.371 -extern DECLSPEC int SDLCALL SDL_vsnprintf (char *text, size_t maxlen,
   1.372 -                                           const char *fmt, va_list ap);
   1.373 +extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen,
   1.374 +                                          const char *fmt, va_list ap);
   1.375  #endif
   1.376  
   1.377  /* The SDL implementation of iconv() returns these error codes */
   1.378 @@ -623,25 +623,25 @@
   1.379  #define SDL_iconv_t     iconv_t
   1.380  #define SDL_iconv_open  iconv_open
   1.381  #define SDL_iconv_close iconv_close
   1.382 -extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf,
   1.383 -                                          size_t * inbytesleft, char **outbuf,
   1.384 -                                          size_t * outbytesleft);
   1.385 +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
   1.386 +                                         size_t * inbytesleft, char **outbuf,
   1.387 +                                         size_t * outbytesleft);
   1.388  #else
   1.389  typedef struct _SDL_iconv_t *SDL_iconv_t;
   1.390 -extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open (const char *tocode,
   1.391 -                                                    const char *fromcode);
   1.392 -extern DECLSPEC int SDLCALL SDL_iconv_close (SDL_iconv_t cd);
   1.393 -extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf,
   1.394 -                                          size_t * inbytesleft, char **outbuf,
   1.395 -                                          size_t * outbytesleft);
   1.396 +extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
   1.397 +                                                   const char *fromcode);
   1.398 +extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
   1.399 +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
   1.400 +                                         size_t * inbytesleft, char **outbuf,
   1.401 +                                         size_t * outbytesleft);
   1.402  #endif
   1.403  /* This function converts a string between encodings in one pass, returning a
   1.404     string that must be freed with SDL_free() or NULL on error.
   1.405  */
   1.406 -extern DECLSPEC char *SDLCALL SDL_iconv_string (const char *tocode,
   1.407 -                                                const char *fromcode,
   1.408 -                                                char *inbuf,
   1.409 -                                                size_t inbytesleft);
   1.410 +extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
   1.411 +                                               const char *fromcode,
   1.412 +                                               char *inbuf,
   1.413 +                                               size_t inbytesleft);
   1.414  #define SDL_iconv_utf8_ascii(S)		SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)
   1.415  #define SDL_iconv_utf8_latin1(S)	SDL_iconv_string("LATIN1", "UTF-8", S, SDL_strlen(S)+1)
   1.416  #define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)