Mercurial > sdl-ios-xcode
diff include/SDL_endian.h @ 3407:d3baf5ac4e37
Partial fix for bug #859
Header file update from Ken for improved doxygen output
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 19 Oct 2009 13:31:58 +0000 |
parents | bcd41b269091 |
children | efb79807afe1 |
line wrap: on
line diff
--- a/include/SDL_endian.h Sun Oct 18 23:21:15 2009 +0000 +++ b/include/SDL_endian.h Mon Oct 19 13:31:58 2009 +0000 @@ -21,9 +21,9 @@ */ /** - * \file SDL_endian.h - * - * Functions for reading and writing endian-specific values + * \file SDL_endian.h + * + * Functions for reading and writing endian-specific values */ #ifndef _SDL_endian_h @@ -31,9 +31,13 @@ #include "SDL_stdinc.h" -/* The two types of endianness */ +/** + * \name The two types of endianness + */ +/*@{*/ #define SDL_LIL_ENDIAN 1234 #define SDL_BIG_ENDIAN 4321 +/*@}*/ #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ #if defined(__hppa__) || \ @@ -56,11 +60,14 @@ /* *INDENT-ON* */ #endif -/* Use inline functions for compilers that support them, and static - functions for those that do not. Because these functions become - static for compilers that do not support inline functions, this - header should only be included in files that actually use them. -*/ +/** + * \file SDL_endian.h + * + * Uses inline functions for compilers that support them, and static + * functions for those that do not. Because these functions become + * static for compilers that do not support inline functions, this + * header should only be included in files that actually use them. + */ #if defined(__GNUC__) && defined(__i386__) && \ !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */) static __inline__ Uint16 @@ -184,10 +191,11 @@ } #endif #else -/* This is mainly to keep compilers from complaining in SDL code. - If there is no real 64-bit datatype, then compilers will complain about - the fake 64-bit datatype that SDL provides when it compiles user code. -*/ +/** + * This is mainly to keep compilers from complaining in SDL code. + * If there is no real 64-bit datatype, then compilers will complain about + * the fake 64-bit datatype that SDL provides when it compiles user code. + */ #define SDL_Swap64(X) (X) #endif /* SDL_HAS_64BIT_TYPE */ @@ -206,7 +214,11 @@ } -/* Byteswap item from the specified endianness to the native endianness */ +/** + * \name Swap to native + * Byteswap item from the specified endianness to the native endianness. + */ +/*@{*/ #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define SDL_SwapLE16(X) (X) #define SDL_SwapLE32(X) (X) @@ -226,6 +238,7 @@ #define SDL_SwapBE64(X) (X) #define SDL_SwapFloatBE(X) (X) #endif +/*@}*//*Swap to native*/ /* Ends C function definitions when using C++ */ #ifdef __cplusplus