--- a/src/Main.h Tue Feb 11 03:29:03 2014 +0200 +++ b/src/Main.h Wed Feb 12 06:15:11 2014 +0200 @@ -29,13 +29,10 @@ #ifndef BOTC_MAIN_H #define BOTC_MAIN_H -#if !defined (__cplusplus) || __cplusplus < 201103L -# error botc requires a C++11-compliant compiler to be built -#endif - #include <cstdio> #include <cstdarg> #include <cstdint> +#include "Macros.h" #include "Property.h" #include "Types.h" #include "Containers.h" @@ -44,38 +41,10 @@ #include "BotStuff.h" #include "Tokens.h" -// Application name and version -#define APPNAME "botc" -#define VERSION_MAJOR 1 -#define VERSION_MINOR 0 -#define VERSION_PATCH 0 - -#define MAKE_VERSION_NUMBER(MAJ, MIN, PAT) ((MAJ * 10000) + (MIN * 100) + PAT) -#define VERSION_NUMBER MAKE_VERSION_NUMBER (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH) - -// On Windows, files are case-insensitive -#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) -#define FILE_CASEINSENSITIVE -#endif - -#define elif else if - -#define types public -#define countof(A) ((int) (sizeof A / sizeof *A)) - -// Shortcut for zeroing something -#define ZERO(obj) memset (&obj, 0, sizeof (obj)); - -enum EFormLength -{ - ELongForm, - EShortForm -}; - String MakeObjectFileName (String s); -EType GetTypeByName (String token); -String GetTypeName (EType type); -String GetVersionString (EFormLength len); +DataType GetTypeByName (String token); +String GetTypeName (DataType type); +String GetVersionString (bool longform); String MakeVersionString (int major, int minor, int patch); template<typename T> @@ -90,9 +59,4 @@ return a < b ? a : b; } -#ifndef __GNUC__ -#define __attribute__(X) -#endif -#define deprecated __attribute__ ((deprecated)) - #endif // BOTC_MAIN_H