Mercurial > hg > dmlib
changeset 770:a8bd679934c7
Indentation cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 10 May 2013 11:29:35 +0300 |
parents | b87c7fc646f9 |
children | 8314b484893f |
files | dmlib.h |
diffstat | 1 files changed, 59 insertions(+), 59 deletions(-) [+] |
line wrap: on
line diff
--- a/dmlib.h Thu May 09 20:13:13 2013 +0300 +++ b/dmlib.h Fri May 10 11:29:35 2013 +0300 @@ -15,9 +15,9 @@ #include <stdarg.h> #ifdef DM_USE_ASSERTS -#include <assert.h> +# include <assert.h> #else -#define assert(NEXPR) // stub +# define assert(NEXPR) // stub #endif #ifdef __cplusplus @@ -31,35 +31,35 @@ /* Error codes */ enum { - // General error codes - DMERR_OK = 0, - DMERR_PROGRESS, // Status OK, but operation in progress + // General error codes + DMERR_OK = 0, + DMERR_PROGRESS, // Status OK, but operation in progress - DMERR_FOPEN, - DMERR_FREAD, - DMERR_FWRITE, - DMERR_FSEEK, - DMERR_NOT_FOUND, // Resource/data not found + DMERR_FOPEN, + DMERR_FREAD, + DMERR_FWRITE, + DMERR_FSEEK, + DMERR_NOT_FOUND, // Resource/data not found - DMERR_INVALID_DATA, // Some data was invalid - DMERR_MALLOC, // Memory allocation failure - DMERR_ALREADY_INIT, // Resource has already been initialized - DMERR_INIT_FAIL, // General initialization failure - DMERR_INVALID_ARGS, + DMERR_INVALID_DATA, // Some data was invalid + DMERR_MALLOC, // Memory allocation failure + DMERR_ALREADY_INIT, // Resource has already been initialized + DMERR_INIT_FAIL, // General initialization failure + DMERR_INVALID_ARGS, - DMERR_NULLPTR, // NULL pointer specified in critical argument - DMERR_NOT_SUPPORTED,// Operation not supported - DMERR_OUT_OF_DATA, - DMERR_EXTRA_DATA, - DMERR_BOUNDS, + DMERR_NULLPTR, // NULL pointer specified in critical argument + DMERR_NOT_SUPPORTED,// Operation not supported + DMERR_OUT_OF_DATA, + DMERR_EXTRA_DATA, + DMERR_BOUNDS, - DMERR_INTERNAL, + DMERR_INTERNAL, - // PACK-file subsystem - DMERR_NOTPACK, - DMERR_VERSION, - DMERR_INVALID, - DMERR_COMPRESSION, + // PACK-file subsystem + DMERR_NOTPACK, + DMERR_VERSION, + DMERR_INVALID, + DMERR_COMPRESSION, }; @@ -77,11 +77,11 @@ #endif #ifndef BOOL -#ifdef bool -#define BOOL bool -#else -#define BOOL int -#endif +# ifdef bool +# define BOOL bool +# else +# define BOOL int +# endif #endif @@ -459,41 +459,41 @@ /* Macros that swap only when needed ... */ #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) -# define DM_LE16_TO_NATIVE(value) DM_SWAP_16_LE_BE(value) -# define DM_LE32_TO_NATIVE(value) DM_SWAP_32_LE_BE(value) -# define DM_NATIVE_TO_LE16(value) DM_SWAP_16_LE_BE(value) -# define DM_NATIVE_TO_LE32(value) DM_SWAP_32_LE_BE(value) +# define DM_LE16_TO_NATIVE(value) DM_SWAP_16_LE_BE(value) +# define DM_LE32_TO_NATIVE(value) DM_SWAP_32_LE_BE(value) +# define DM_NATIVE_TO_LE16(value) DM_SWAP_16_LE_BE(value) +# define DM_NATIVE_TO_LE32(value) DM_SWAP_32_LE_BE(value) -# define DM_BE16_TO_NATIVE(value) ((Uint16) (value)) -# define DM_BE32_TO_NATIVE(value) ((Uint32) (value)) -# define DM_NATIVE_TO_BE16(value) ((Uint16) (value)) -# define DM_NATIVE_TO_BE32(value) ((Uint32) (value)) +# define DM_BE16_TO_NATIVE(value) ((Uint16) (value)) +# define DM_BE32_TO_NATIVE(value) ((Uint32) (value)) +# define DM_NATIVE_TO_BE16(value) ((Uint16) (value)) +# define DM_NATIVE_TO_BE32(value) ((Uint32) (value)) -# ifdef DM_HAVE_64BIT -# define DM_LE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value) -# define DM_NATIVE_TO_LE64(value) DM_SWAP_64_LE_BE(value) -# define DM_BE64_TO_NATIVE(value) ((Uint64) (value)) -# define DM_NATIVE_TO_BE64(value) ((Uint64) (value)) -# endif +# ifdef DM_HAVE_64BIT +# define DM_LE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value) +# define DM_NATIVE_TO_LE64(value) DM_SWAP_64_LE_BE(value) +# define DM_BE64_TO_NATIVE(value) ((Uint64) (value)) +# define DM_NATIVE_TO_BE64(value) ((Uint64) (value)) +# endif #elif (SDL_BYTEORDER == SDL_LIL_ENDIAN) -# define DM_LE16_TO_NATIVE(value) ((Uint16) (value)) -# define DM_LE32_TO_NATIVE(value) ((Uint32) (value)) -# define DM_NATIVE_TO_LE16(value) ((Uint16) (value)) -# define DM_NATIVE_TO_LE32(value) ((Uint32) (value)) +# define DM_LE16_TO_NATIVE(value) ((Uint16) (value)) +# define DM_LE32_TO_NATIVE(value) ((Uint32) (value)) +# define DM_NATIVE_TO_LE16(value) ((Uint16) (value)) +# define DM_NATIVE_TO_LE32(value) ((Uint32) (value)) -# define DM_BE16_TO_NATIVE(value) DM_SWAP_16_LE_BE(value) -# define DM_BE32_TO_NATIVE(value) DM_SWAP_32_LE_BE(value) -# define DM_NATIVE_TO_BE16(value) DM_SWAP_16_LE_BE(value) -# define DM_NATIVE_TO_BE32(value) DM_SWAP_32_LE_BE(value) +# define DM_BE16_TO_NATIVE(value) DM_SWAP_16_LE_BE(value) +# define DM_BE32_TO_NATIVE(value) DM_SWAP_32_LE_BE(value) +# define DM_NATIVE_TO_BE16(value) DM_SWAP_16_LE_BE(value) +# define DM_NATIVE_TO_BE32(value) DM_SWAP_32_LE_BE(value) -# ifdef DM_HAVE_64BIT -# define DM_LE64_TO_NATIVE(value) ((Uint64) (value)) -# define DM_NATIVE_TO_LE64(value) ((Uint64) (value)) -# define DM_BE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value) -# define DM_NATIVE_TO_BE64(value) DM_SWAP_64_LE_BE(value) -# endif +# ifdef DM_HAVE_64BIT +# define DM_LE64_TO_NATIVE(value) ((Uint64) (value)) +# define DM_NATIVE_TO_LE64(value) ((Uint64) (value)) +# define DM_BE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value) +# define DM_NATIVE_TO_BE64(value) DM_SWAP_64_LE_BE(value) +# endif #endif