diff include/SDL_stdinc.h @ 4217:4c4113c2162c SDL-1.2

Fixed bug #706 Ken Bull 2009-02-25 13:22:02 PST Adds Doxygen support for all headers (except config and boilerplate headers) in the include folder for SDL-1.2 revision 4446. While in general SDL is quite thoroughly commented, none of these comments are correctly formatted for Doxygen and are generally inconsistent in their formatting.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 09:38:10 +0000
parents 6512a61c2c73
children 6823a52d06fa
line wrap: on
line diff
--- a/include/SDL_stdinc.h	Mon Sep 21 09:27:08 2009 +0000
+++ b/include/SDL_stdinc.h	Mon Sep 21 09:38:10 2009 +0000
@@ -20,7 +20,9 @@
     slouken@libsdl.org
 */
 
-/* This is a general header that includes C language support */
+/** @file SDL_stdinc.h
+ *  This is a general header that includes C language support
+ */
 
 #ifndef _SDL_stdinc_h
 #define _SDL_stdinc_h
@@ -72,11 +74,12 @@
 # include <iconv.h>
 #endif
 
-/* The number of elements in an array */
+/** The number of elements in an array */
 #define SDL_arraysize(array)	(sizeof(array)/sizeof(array[0]))
 #define SDL_TABLESIZE(table)	SDL_arraysize(table)
 
-/* Basic data types */
+/** @name Basic data types */
+/*@{*/
 typedef enum SDL_bool {
 	SDL_FALSE = 0,
 	SDL_TRUE  = 1
@@ -102,7 +105,10 @@
 } Uint64, Sint64;
 #endif
 
-/* Make sure the types really have the right sizes */
+/*@}*/
+
+/** @name Make sure the types really have the right sizes */
+/*@{*/
 #define SDL_COMPILE_TIME_ASSERT(name, x)               \
        typedef int SDL_dummy_ ## name[(x) * 2 - 1]
 
@@ -114,12 +120,14 @@
 SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
 SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
 SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
+/*@}*/
 
-/* 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).
-*/
+/** @name Enum Size Check
+ *  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") */
 #ifdef __MWERKS__
 #pragma enumsalwaysint on
@@ -132,7 +140,7 @@
 #ifndef __NDS__
 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
 #endif
-
+/*@}*/
 
 #include "begin_code.h"
 /* Set up for C function definitions, even when using C++ */
@@ -565,11 +573,15 @@
 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 */
+/** @name SDL_ICONV Error Codes
+ *  The SDL implementation of iconv() returns these error codes 
+ */
+/*@{*/
 #define SDL_ICONV_ERROR		(size_t)-1
 #define SDL_ICONV_E2BIG		(size_t)-2
 #define SDL_ICONV_EILSEQ	(size_t)-3
 #define SDL_ICONV_EINVAL	(size_t)-4
+/*@}*/
 
 #ifdef HAVE_ICONV
 #define SDL_iconv_t     iconv_t
@@ -581,9 +593,9 @@
 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
 #endif
 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.
-*/
+/** 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);
 #define SDL_iconv_utf8_locale(S)	SDL_iconv_string("", "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)