src/types.h

changeset 513
29eb671b34f6
parent 504
6a1fa662bfc1
child 522
afa691788bdb
equal deleted inserted replaced
512:adab82ab13a5 513:29eb671b34f6
321 // log() - universal access to the message log. Defined here so that I don't have 321 // log() - universal access to the message log. Defined here so that I don't have
322 // to include messagelog.h here and recompile everything every time that file changes. 322 // to include messagelog.h here and recompile everything every time that file changes.
323 void DoLog (std::initializer_list<StringFormatArg> args); 323 void DoLog (std::initializer_list<StringFormatArg> args);
324 324
325 // Macros to access these functions 325 // Macros to access these functions
326 # ifndef IN_IDE_PARSER 326 # ifndef IN_IDE_PARSER
327 #define fmt(...) DoFormat ({__VA_ARGS__}) 327 #define fmt(...) DoFormat ({__VA_ARGS__})
328 # define print(...) doPrint (g_file_stdout, {__VA_ARGS__})
329 # define fprint(F, ...) doPrint (F, {__VA_ARGS__}) 328 # define fprint(F, ...) doPrint (F, {__VA_ARGS__})
330 # define log(...) DoLog({ __VA_ARGS__ }); 329 # define log(...) DoLog({ __VA_ARGS__ })
331 #else 330 #else
332 str fmt (const char* fmtstr, ...); 331 str fmt (const char* fmtstr, ...);
333 void print (const char* fmtstr, ...);
334 void fprint (File& f, const char* fmtstr, ...); 332 void fprint (File& f, const char* fmtstr, ...);
335 void log (const char* fmtstr, ...); 333 void log (const char* fmtstr, ...);
336 #endif 334 #endif
337 335
338 extern File g_file_stdout; 336 extern File g_file_stdout;

mercurial