include/SDL_stdinc.h
branchSDL-1.2
changeset 4217 4c4113c2162c
parent 4182 6512a61c2c73
child 4222 6823a52d06fa
     1.1 --- a/include/SDL_stdinc.h	Mon Sep 21 09:27:08 2009 +0000
     1.2 +++ b/include/SDL_stdinc.h	Mon Sep 21 09:38:10 2009 +0000
     1.3 @@ -20,7 +20,9 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  
     1.7 -/* This is a general header that includes C language support */
     1.8 +/** @file SDL_stdinc.h
     1.9 + *  This is a general header that includes C language support
    1.10 + */
    1.11  
    1.12  #ifndef _SDL_stdinc_h
    1.13  #define _SDL_stdinc_h
    1.14 @@ -72,11 +74,12 @@
    1.15  # include <iconv.h>
    1.16  #endif
    1.17  
    1.18 -/* The number of elements in an array */
    1.19 +/** The number of elements in an array */
    1.20  #define SDL_arraysize(array)	(sizeof(array)/sizeof(array[0]))
    1.21  #define SDL_TABLESIZE(table)	SDL_arraysize(table)
    1.22  
    1.23 -/* Basic data types */
    1.24 +/** @name Basic data types */
    1.25 +/*@{*/
    1.26  typedef enum SDL_bool {
    1.27  	SDL_FALSE = 0,
    1.28  	SDL_TRUE  = 1
    1.29 @@ -102,7 +105,10 @@
    1.30  } Uint64, Sint64;
    1.31  #endif
    1.32  
    1.33 -/* Make sure the types really have the right sizes */
    1.34 +/*@}*/
    1.35 +
    1.36 +/** @name Make sure the types really have the right sizes */
    1.37 +/*@{*/
    1.38  #define SDL_COMPILE_TIME_ASSERT(name, x)               \
    1.39         typedef int SDL_dummy_ ## name[(x) * 2 - 1]
    1.40  
    1.41 @@ -114,12 +120,14 @@
    1.42  SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
    1.43  SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
    1.44  SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
    1.45 +/*@}*/
    1.46  
    1.47 -/* Check to make sure enums are the size of ints, for structure packing.
    1.48 -   For both Watcom C/C++ and Borland C/C++ the compiler option that makes
    1.49 -   enums having the size of an int must be enabled.
    1.50 -   This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
    1.51 -*/
    1.52 +/** @name Enum Size Check
    1.53 + *  Check to make sure enums are the size of ints, for structure packing.
    1.54 + *  For both Watcom C/C++ and Borland C/C++ the compiler option that makes
    1.55 + *  enums having the size of an int must be enabled.
    1.56 + *  This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
    1.57 + */
    1.58  /* Enable enums always int in CodeWarrior (for MPW use "-enum int") */
    1.59  #ifdef __MWERKS__
    1.60  #pragma enumsalwaysint on
    1.61 @@ -132,7 +140,7 @@
    1.62  #ifndef __NDS__
    1.63  SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
    1.64  #endif
    1.65 -
    1.66 +/*@}*/
    1.67  
    1.68  #include "begin_code.h"
    1.69  /* Set up for C function definitions, even when using C++ */
    1.70 @@ -565,11 +573,15 @@
    1.71  extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
    1.72  #endif
    1.73  
    1.74 -/* The SDL implementation of iconv() returns these error codes */
    1.75 +/** @name SDL_ICONV Error Codes
    1.76 + *  The SDL implementation of iconv() returns these error codes 
    1.77 + */
    1.78 +/*@{*/
    1.79  #define SDL_ICONV_ERROR		(size_t)-1
    1.80  #define SDL_ICONV_E2BIG		(size_t)-2
    1.81  #define SDL_ICONV_EILSEQ	(size_t)-3
    1.82  #define SDL_ICONV_EINVAL	(size_t)-4
    1.83 +/*@}*/
    1.84  
    1.85  #ifdef HAVE_ICONV
    1.86  #define SDL_iconv_t     iconv_t
    1.87 @@ -581,9 +593,9 @@
    1.88  extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
    1.89  #endif
    1.90  extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
    1.91 -/* This function converts a string between encodings in one pass, returning a
    1.92 -   string that must be freed with SDL_free() or NULL on error.
    1.93 -*/
    1.94 +/** This function converts a string between encodings in one pass, returning a
    1.95 + *  string that must be freed with SDL_free() or NULL on error.
    1.96 + */
    1.97  extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);
    1.98  #define SDL_iconv_utf8_locale(S)	SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
    1.99  #define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)