diff options
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r-- | src/common/cbasetypes.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 0f443192d..ff00aaa49 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -243,6 +243,9 @@ typedef int bool; #endif // not cplusplus ////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// macro tools + #ifdef swap // just to be sure #undef swap #endif @@ -271,4 +274,45 @@ typedef int bool; #define NBBY 8 #endif +////////////////////////////////////////////////////////////////////////// +// path separator + +#if defined(WIN32) +#define PATHSEP '\\' +#elif defined(__APPLE__) +#define PATHSEP ':' +#else +#define PATHSEP '/' +#endif + +////////////////////////////////////////////////////////////////////////// +// EOL separator + +#if defined(WIN32) || defined(CYGWIN) +#define RETCODE "\r\n" // CR/LF : Windows systems +#elif defined(__APPLE__) +#define RETCODE "\r" // CR : Macintosh systems +#else +#define RETCODE "\n" // LF : Unix systems +#endif + +#define RET RETCODE + +////////////////////////////////////////////////////////////////////////// +// Assert + +#if ! defined(Assert) +#if defined(RELEASE) +#define Assert(EX) +#else +// extern "C" { +#include <assert.h> +// } +#if !defined(DEFCPP) && defined(WIN32) && !defined(MINGW) +#include <crtdbg.h> +#endif +#define Assert(EX) assert(EX) +#endif +#endif /* ! defined(Assert) */ + #endif /* _CBASETYPES_H_ */ |