diff options
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h index 52e4295bbb..b3dd6a4f64 100644 --- a/common/util.h +++ b/common/util.h @@ -63,6 +63,20 @@ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; } #define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0]))) +/** + * @def SCUMMVM_CURRENT_FUNCTION + * This macro evaluates to the current function's name on compilers supporting this. + */ +#if defined(__GNUC__) +# define SCUMMVM_CURRENT_FUNCTION __PRETTY_FUNCTION__ +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +# define SCUMMVM_CURRENT_FUNCTION __func__ +#elif defined(_MSC_VER) && _MSC_VER >= 1300 +# define SCUMMVM_CURRENT_FUNCTION __FUNCTION__ +#else +# define SCUMMVM_CURRENT_FUNCTION "<unknown>" +#endif + namespace Common { /** @@ -119,6 +133,7 @@ enum Language { struct LanguageDescription { const char *code; + //const char *unixLocale; const char *description; Common::Language id; }; @@ -131,6 +146,10 @@ extern Language parseLanguage(const String &str); extern const char *getLanguageCode(Language id); extern const char *getLanguageDescription(Language id); +// locale <-> Language conversion is disabled, since it is not used currently +/*extern const char *getLanguageLocale(Language id); +extern Language parseLanguageFromLocale(const char *locale);*/ + /** * List of game platforms. Specifying a platform for a target can be used to * give the game engines a hint for which platform the game data file are. |