home *** CD-ROM | disk | FTP | other *** search
-
- /* debug.h */
-
- #ifndef ibarpatch_debug_H
- #define ibarpatch_debug_H
-
- #include <stdio.h>
-
-
- /* Some diagnostic macros */
-
- #ifdef DEBUG
- # define DEBUGF(s) fprintf(stderr, (s))
- # define DEBUGF1(s, a1) fprintf(stderr, (s), (a1))
- # define DEBUGF2(s, a1, a2) fprintf(stderr, (s), (a1), (a2))
- # define DEBUGF3(s, a1, a2, a3) fprintf(stderr, (s), (a1), (a2), (a3))
- #else
- # define DEBUGF(s) ((void) 0)
- # define DEBUGF1(s, a1) ((void) 0)
- # define DEBUGF2(s, a1, a2) ((void) 0)
- # define DEBUGF3(s, a1, a2, a3) ((void) 0)
- #endif
-
- /* Logs function calls */
- #define LOGFUNC(leaf) DEBUGF(MODULE_NAME ": entering " #leaf "\n")
-
-
- #if 0
-
- #include "OS:os.h"
-
- /* Rather desperate debugging code: Turns the screen border a different
- colour throughout suspect code. Useful if the machine crashes. */
- #define SUSPECT_BEGIN(col) palettev_set_entry(0, 24, (col), (col))
- #define SUSPECT_END() palettev_set_entry(0, 24, 0, 0)
-
- #endif
-
-
- #endif
-