Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / muimaster / debug.h
blobfb5d878fc8b80e4b5f64b4241d50083a24dda3dc
1 /*
2 Copyright © 2002, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #ifndef __DEBUG_H
9 #define __DEBUG_H
11 /* Debug Macros */
13 #ifdef __AROS__
15 #undef DEBUG
17 #ifdef MYDEBUG
18 #define DEBUG 1
19 #else
20 #define DEBUG 0
21 #endif
22 #include <aros/debug.h>
24 #else /* ! __AROS__ */
26 #ifdef __amigaos4__
27 # define bug DebugPrintF
28 #else
29 # define bug kprintf
30 #endif
32 #define ASSERT(x)
33 #define ASSERT_VALID_PTR(x)
35 #ifdef MYDEBUG
37 #ifdef __AMIGAOS4__
38 # undef SysBase
39 # include <proto/exec.h>
40 # define D(x) do {Forbid();DebugPrintF("%s/%ld Task \"%s\" [%s()] => ", __FILE__, __LINE__, FindTask(NULL)->tc_Node.ln_Name,__PRETTY_FUNCTION__);(x);Permit();} while(0);
41 #else
42 void kprintf(char *string, ...);
43 # define D(x) {kprintf("%s/%ld (%s): ", __FILE__, __LINE__, FindTask(NULL)->tc_Node.ln_Name);(x);};
44 #endif
46 #else
47 #define D(x) ;
49 #endif /* MYDEBUG */
51 #endif /* ! __AROS__ */
53 #endif /* __DEBUG_H */