diff options
author | Max Horn | 2008-11-13 11:26:47 +0000 |
---|---|---|
committer | Max Horn | 2008-11-13 11:26:47 +0000 |
commit | a6502da9acae76abe874da65d4a1ba2576e58e76 (patch) | |
tree | 9b84dab833b74d4775802665b2bac1b3f5d43e6c /common/util.h | |
parent | c0786313fa568079b8d54ddb1734102badcad1cd (diff) | |
download | scummvm-rg350-a6502da9acae76abe874da65d4a1ba2576e58e76.tar.gz scummvm-rg350-a6502da9acae76abe874da65d4a1ba2576e58e76.tar.bz2 scummvm-rg350-a6502da9acae76abe874da65d4a1ba2576e58e76.zip |
* got rid of CDECL
* got rid of scumm_strrev
* added DISABLE_TEXT_CONSOLE flag which disables printf, warning, debug (but not error)
svn-id: r35038
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/common/util.h b/common/util.h index 573004c437..80f5c4385f 100644 --- a/common/util.h +++ b/common/util.h @@ -306,21 +306,34 @@ uint32 getEnabledSpecialDebugLevels(); #if defined(__GNUC__) -void CDECL error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN; +void error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN; #else -void CDECL NORETURN error(const char *s, ...); +void NORETURN error(const char *s, ...); #endif -void CDECL warning(const char *s, ...) GCC_PRINTF(1, 2); +#ifdef DISABLE_TEXT_CONSOLE -void CDECL debug(int level, const char *s, ...) GCC_PRINTF(2, 3); -void CDECL debug(const char *s, ...) GCC_PRINTF(1, 2); -void CDECL debugN(int level, const char *s, ...) GCC_PRINTF(2, 3); -void CDECL debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF(3, 4); +inline void printf(const char *s, ...) {} -extern int gDebugLevel; +inline void warning(const char *s, ...) {} + +inline void debug(int level, const char *s, ...) {} +inline void debug(const char *s, ...) {} +inline void debugN(int level, const char *s, ...) {} +inline void debugC(int level, uint32 engine_level, const char *s, ...) {} + +#else + +void warning(const char *s, ...) GCC_PRINTF(1, 2); -char *scumm_strrev(char *str); +void debug(int level, const char *s, ...) GCC_PRINTF(2, 3); +void debug(const char *s, ...) GCC_PRINTF(1, 2); +void debugN(int level, const char *s, ...) GCC_PRINTF(2, 3); +void debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF(3, 4); + +#endif + +extern int gDebugLevel; Common::String tag2string(uint32 tag); #define tag2str(x) tag2string(x).c_str() |