57 # define devf(...) doDevf (__func__, __VA_ARGS__); |
57 # define devf(...) doDevf (__func__, __VA_ARGS__); |
58 #else |
58 #else |
59 # define devf(...) |
59 # define devf(...) |
60 #endif // RELEASE |
60 #endif // RELEASE |
61 |
61 |
62 class QFile; |
62 extern File g_file_stdout; |
63 extern QFile g_file_stdout; |
63 extern File g_file_stderr; |
64 extern QFile g_file_stderr; |
|
65 |
64 |
66 void doDevf (const char* func, const char* fmtstr, ...); |
65 void doDevf (const char* func, const char* fmtstr, ...); |
67 |
66 |
68 // Version string identifier |
67 // Version string identifier |
69 str versionString (); |
68 str versionString (); |
147 #ifndef IN_IDE_PARSER |
146 #ifndef IN_IDE_PARSER |
148 #define print(...) doPrint (g_file_stdout, {__VA_ARGS__}) |
147 #define print(...) doPrint (g_file_stdout, {__VA_ARGS__}) |
149 #define fprint(F, ...) doPrint (F, {__VA_ARGS__}) |
148 #define fprint(F, ...) doPrint (F, {__VA_ARGS__}) |
150 #else |
149 #else |
151 void print (const char* fmtstr, ...); |
150 void print (const char* fmtstr, ...); |
152 void fprint (QFile& f, const char* fmtstr, ...); |
151 void fprint (File& f, const char* fmtstr, ...); |
153 #endif |
152 #endif |
154 void doPrint (QFile& f, initlist<StringFormatArg> args); |
153 void doPrint (File& f, initlist<StringFormatArg> args); |
155 void doPrint (FILE* f, initlist<StringFormatArg> args); |
154 void doPrint (FILE* f, initlist<StringFormatArg> args); // heh |
156 |
155 |
157 // Replace assert with a version that shows a GUI dialog if possible |
156 // Replace assert with a version that shows a GUI dialog if possible |
158 #ifdef assert |
157 #ifdef assert |
159 #undef assert |
158 #undef assert |
160 #endif // assert |
159 #endif // assert |
165 #define assert(N) \ |
164 #define assert(N) \ |
166 (N) ? ((void)(0)) : assertionFailure(__FILE__, __LINE__, FUNCNAME, #N) |
165 (N) ? ((void)(0)) : assertionFailure(__FILE__, __LINE__, FUNCNAME, #N) |
167 |
166 |
168 #define fatal(MSG) \ |
167 #define fatal(MSG) \ |
169 fatalError (__FILE__, __LINE__, FUNCNAME, MSG) |
168 fatalError (__FILE__, __LINE__, FUNCNAME, MSG) |
170 |
|
171 // Null pointer |
|
172 static const std::nullptr_t null = nullptr; |
|
173 |
169 |
174 // Main and edge color identifiers |
170 // Main and edge color identifiers |
175 static const short maincolor = 16; |
171 static const short maincolor = 16; |
176 static const short edgecolor = 24; |
172 static const short edgecolor = 24; |
177 |
173 |