error_handling.h (558B)
1#ifndef _ERROR_HANDLING 2#define _ERROR_HANDLING 3 4extern char errbuffer[1024]; 5 6#ifdef WIN32 7 8#ifndef _MSC_VER 9#define ERRM(x...) { sprintf( errbuffer, x ); MessageBox( 0, errbuffer, "cnping", 0 ); } 10#define ERRMB(x...) { sprintf( errbuffer, x ); } 11#else 12#define ERRM(...) { sprintf( errbuffer, __VA_ARGS__ ); MessageBox( 0, errbuffer, "cnping", 0 ); } 13#define ERRMB(...) { sprintf( errbuffer, __VA_ARGS__ ); } 14#endif 15 16#else 17 18#define ERRM(x...) { fprintf( stderr, x ); } 19#define ERRMB(x...) { sprintf( errbuffer, x); fprintf( stderr, x ); } 20 21#endif 22 23 24#endif