2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
14 int error_init(void (*func)(char *), char *fmt,...); //init error system, set default message, returns 0=ok
15 void set_exit_message(char *fmt,...); //specify message to print at exit
16 void Warning(char *fmt,...); //print out warning message to user
17 void set_warn_func(void (*f)(char *s));//specifies the function to call with warning messages
18 void clear_warn_func(void (*f)(char *s));//say this function no longer valid
19 void _Assert(int expr,char *expr_text,char *filename,int linenum); //assert func
20 void Error(char *fmt,...); //exit with error code=1, print message
22 #ifndef NDEBUG //macros for debugging
28 #define Int3() WinInt3()
29 #define Assert(expr) _Assert(expr, #expr, __FILE__, __LINE__)
31 void Int3(void); //generate int3
32 #pragma aux Int3 = "int 3h";
34 #define Assert(expr) _Assert(expr,#expr,__FILE__,__LINE__)
36 //make error do int3, then call func
37 #pragma aux Error aborts = \
41 //#pragma aux Error aborts;
43 //make assert do int3 (if expr false), then call func
44 #pragma aux _Assert parm [eax] [edx] [ebx] [ecx] = \
52 #else // ifndef MACINTOSH
54 extern int MacEnableInt3;
56 #define Int3() do { key_close(); if (MacEnableInt3) Debugger(); } while(0)
57 #define Assert(expr) MacAssert(expr,#expr,__FILE__,__LINE__)
59 #endif // ifndef MACINTOSH
61 #else //macros for real game
64 #pragma aux Error aborts;
67 #define Assert(__ignore) ((void)0)
68 #define Int3() ((void)0)