e8dcb49a76
git-svn-id: svn://10.65.10.50/trunk@793 c028cbd2-c16b-5b4b-a496-9718f37d4682
60 lines
1.3 KiB
C
Executable File
60 lines
1.3 KiB
C
Executable File
#ifndef __CHECKS_H
|
|
#define __CHECKS_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
/* @FPUB */
|
|
int message_box(const char* fmt, ...);
|
|
int warning_box(const char* fmt, ...);
|
|
int sorry_box(const char* fmt, ...);
|
|
int error_box(const char* fmt, ...);
|
|
int fatal_box(const char* fmt, ...);
|
|
int yesno_box(const char* fmt, ...);
|
|
int yesnocancel_box(const char* fmt, ...);
|
|
int yesnofatal_box(const char* fmt, ...);
|
|
int __trace(const char* fmt, ...);
|
|
|
|
/* @END */
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
/* @M
|
|
Utilizzate in fase di debug (definire il simbolo DBG in compilazione)
|
|
*/
|
|
#ifdef DBG
|
|
#define CHECK(p, m) ( (p) ? (void)0 : (void) fatal_box( \
|
|
"Check failed in %s, line %d:\n\r%s", \
|
|
__FILE__, __LINE__, m) )
|
|
|
|
#define CHECKS(p, m, s0) ( (p) ? (void)0 : (void) fatal_box( \
|
|
"Check failed in %s, line %d:\n\r%s%s", \
|
|
__FILE__, __LINE__, m, s0) )
|
|
|
|
#define CHECKD(p, m, d0) ( (p) ? (void)0 : (void) fatal_box( \
|
|
"Check failed in %s, line %d:\n\r%s%d", \
|
|
__FILE__, __LINE__, m, d0) )
|
|
#else
|
|
|
|
#define CHECK(p, m)
|
|
#define CHECKS(p, m, s)
|
|
#define CHECKD(p, m, d)
|
|
|
|
#endif
|
|
/* @END */
|
|
|
|
|
|
/* @M
|
|
Utilizzata in fase di debug (definire il simbolo TRC in compilazione)
|
|
*/
|
|
#ifdef TRC
|
|
#define TRACE __trace
|
|
#else
|
|
#define TRACE 1 ? 0 : __trace
|
|
#endif
|
|
/* @END */
|
|
|
|
#endif // __CHECKS_H
|