include/SDL_stdinc.h
changeset 3407 d3baf5ac4e37
parent 3365 9cd5b35c0184
child 3567 fb9ea4b549c3
     1.1 --- a/include/SDL_stdinc.h	Sun Oct 18 23:21:15 2009 +0000
     1.2 +++ b/include/SDL_stdinc.h	Mon Oct 19 13:31:58 2009 +0000
     1.3 @@ -21,9 +21,9 @@
     1.4  */
     1.5  
     1.6  /**
     1.7 - * \file SDL_stdinc.h
     1.8 - *
     1.9 - * This is a general header that includes C language support
    1.10 + *  \file SDL_stdinc.h
    1.11 + *  
    1.12 + *  This is a general header that includes C language support.
    1.13   */
    1.14  
    1.15  #ifndef _SDL_stdinc_h
    1.16 @@ -79,12 +79,19 @@
    1.17  # include <iconv.h>
    1.18  #endif
    1.19  
    1.20 -/* The number of elements in an array */
    1.21 +/**
    1.22 + *  The number of elements in an array.
    1.23 + */
    1.24  #define SDL_arraysize(array)	(sizeof(array)/sizeof(array[0]))
    1.25  #define SDL_TABLESIZE(table)	SDL_arraysize(table)
    1.26  
    1.27 -/* Use proper C++ casts when compiled as C++ to be compatible with the option
    1.28 - -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above. */
    1.29 +/**
    1.30 + *  \name Cast operators
    1.31 + *  
    1.32 + *  Use proper C++ casts when compiled as C++ to be compatible with the option
    1.33 + *  -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
    1.34 + */
    1.35 +/*@{*/
    1.36  #ifdef __cplusplus
    1.37  #define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
    1.38  #define SDL_static_cast(type, expression) static_cast<type>(expression)
    1.39 @@ -92,8 +99,13 @@
    1.40  #define SDL_reinterpret_cast(type, expression) ((type)(expression))
    1.41  #define SDL_static_cast(type, expression) ((type)(expression))
    1.42  #endif
    1.43 +/*@}*//*Cast operators*/
    1.44  
    1.45 -/* Basic data types */
    1.46 +/**
    1.47 + *  \name Basic data types
    1.48 + */
    1.49 +/*@{*/
    1.50 +
    1.51  typedef enum
    1.52  {
    1.53      SDL_FALSE = 0,
    1.54 @@ -101,45 +113,37 @@
    1.55  } SDL_bool;
    1.56  
    1.57  /**
    1.58 - * \typedef Sint8
    1.59   * \brief A signed 8-bit integer type.
    1.60   */
    1.61  typedef int8_t Sint8;
    1.62  /**
    1.63 - * \typedef Uint8
    1.64   * \brief An unsigned 8-bit integer type.
    1.65   */
    1.66  typedef uint8_t Uint8;
    1.67  /**
    1.68 - * \typedef Sint16
    1.69   * \brief A signed 16-bit integer type.
    1.70   */
    1.71  typedef int16_t Sint16;
    1.72  /**
    1.73 - * \typedef Uint16
    1.74   * \brief An unsigned 16-bit integer type.
    1.75   */
    1.76  typedef uint16_t Uint16;
    1.77  /**
    1.78 - * \typedef Sint32
    1.79   * \brief A signed 32-bit integer type.
    1.80   */
    1.81  typedef int32_t Sint32;
    1.82  /**
    1.83 - * \typedef Uint32
    1.84   * \brief An unsigned 32-bit integer type.
    1.85   */
    1.86  typedef uint32_t Uint32;
    1.87  
    1.88  #ifdef SDL_HAS_64BIT_TYPE
    1.89  /**
    1.90 - * \typedef Sint64
    1.91   * \brief A signed 64-bit integer type.
    1.92   * \warning On platforms without any sort of 64-bit datatype, this is equivalent to Sint32!
    1.93   */
    1.94  typedef int64_t Sint64;
    1.95  /**
    1.96 - * \typedef Uint64
    1.97   * \brief An unsigned 64-bit integer type.
    1.98   * \warning On platforms without any sort of 64-bit datatype, this is equivalent to Uint32!
    1.99   */
   1.100 @@ -150,9 +154,12 @@
   1.101  typedef Uint32 Uint64;
   1.102  #endif
   1.103  
   1.104 -/* Make sure the types really have the right sizes */
   1.105 +/*@}*//*Basic data types*/
   1.106 +
   1.107 +
   1.108  #define SDL_COMPILE_TIME_ASSERT(name, x)               \
   1.109         typedef int SDL_dummy_ ## name[(x) * 2 - 1]
   1.110 +/** \cond */
   1.111  #ifndef DOXYGEN_SHOULD_IGNORE_THIS
   1.112  SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
   1.113  SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
   1.114 @@ -167,6 +174,7 @@
   1.115  SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
   1.116  #endif
   1.117  #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
   1.118 +/** \endcond */
   1.119  
   1.120  /* Check to make sure enums are the size of ints, for structure packing.
   1.121     For both Watcom C/C++ and Borland C/C++ the compiler option that makes
   1.122 @@ -178,6 +186,7 @@
   1.123  #pragma enumsalwaysint on
   1.124  #endif
   1.125  
   1.126 +/** \cond */
   1.127  #ifndef DOXYGEN_SHOULD_IGNORE_THIS
   1.128  #ifndef __NINTENDODS__          /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
   1.129  typedef enum
   1.130 @@ -188,6 +197,7 @@
   1.131  SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
   1.132  #endif
   1.133  #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
   1.134 +/** \endcond */
   1.135  
   1.136  #include "begin_code.h"
   1.137  /* Set up for C function definitions, even when using C++ */
   1.138 @@ -748,9 +758,10 @@
   1.139  extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
   1.140                                           size_t * inbytesleft, char **outbuf,
   1.141                                           size_t * outbytesleft);
   1.142 -/* This function converts a string between encodings in one pass, returning a
   1.143 -   string that must be freed with SDL_free() or NULL on error.
   1.144 -*/
   1.145 +/**
   1.146 + *  This function converts a string between encodings in one pass, returning a
   1.147 + *  string that must be freed with SDL_free() or NULL on error.
   1.148 + */
   1.149  extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
   1.150                                                 const char *fromcode,
   1.151                                                 const char *inbuf,