ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/dclient/include/compiler.h
Revision: 1.4
Committed: Tue Oct 19 09:45:03 2010 UTC (13 years, 8 months ago) by sf-pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +6 -2 lines
Log Message:
- use wchar_t for single characters (glyphs and line drawing)
- merge ncurses and ndk wrappers
- simplify colour caching

File Contents

# User Rev Content
1 sf-pippijn 1.3 #include "autoconf.h"
2    
3 sf-pippijn 1.1 #define GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
4 sf-pippijn 1.2
5     #include "adt/foreach.h"
6     #include "adt/nullptr.h"
7     #include "adt/logs.h"
8    
9 sf-pippijn 1.4 void log_failure (char const *file, int line, char const *func, char const *cond);
10    
11     #define LOC __FILE__, __LINE__, __func__
12    
13 sf-pippijn 1.2 #define return_unless(cond) \
14     do { \
15     if (!(cond)) \
16 sf-pippijn 1.4 { log_failure (LOC, #cond); \
17 sf-pippijn 1.2 return; } \
18     } while (0)
19    
20     #define return_val_unless(cond, val) \
21     do { \
22     if (!(cond)) \
23 sf-pippijn 1.4 { log_failure (LOC, #cond); \
24 sf-pippijn 1.2 return val; } \
25     } while (0)