home *** CD-ROM | disk | FTP | other *** search
- /* =============
- * DGDebugging.h
- * =============
- */
-
- #ifndef DGDEBUGGING_H
- #define DGDEBUGGING_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- #ifdef _NO_DEBUGGING_AT_ALL_NOT_EVEN_A_LITTLE_BIT
-
- #undef _USE_MWERKS_DEBUGGING
- #define DebugBeep()
- #define SignalPStr_(pstr)
-
- #else /* _NO_DEBUGGING_AT_ALL_NOT_EVEN_A_LITTLE_BIT */
-
- void DebugBeep(void);
-
- #define SignalPStr_(pstr) do {DebugBeep();} while (0)
-
- #endif /* _NO_DEBUGGING_AT_ALL_NOT_EVEN_A_LITTLE_BIT */
-
- #ifdef __cplusplus
- #ifdef _USE_MWERKS_DEBUGGING
-
- #define Debug_Signal
- #define Debug_Throw
- /* PowerPlant */
- #include <UDebugging.h>
- #include <UException.h>
-
- #else /* _USE_MWERKS_DEBUGGING */
-
- typedef long ExceptionCode;
- #define Throw_(err) throw (ExceptionCode)(err)
- #define ThrowOSErr_(err) Throw_(err)
- #define ThrowIfOSErr_(err) \
- do { \
- OSErr err_ = (err); \
- if (err_ != noErr) Throw_(err_); \
- } while (0)
- #define ThrowIfNULL_(ptr) do {if ((ptr) == NULL) Throw_('null');} while (0)
- #define ThrowIfMemFail_(ptr) do {if ((ptr) == NULL) Throw_(memFullErr);} while (0)
-
- #endif /* _USE_MWERKS_DEBUGGING */
- #endif /* __cplusplus */
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* DGDEBUGGING_H */
-