1 line
1.2 KiB
C
1 line
1.2 KiB
C
|
// ===========================================================================
// UAMDebug.h <09> 1997 Microsoft Corp. All rights reserved.
// ===========================================================================
// Debugging routines for MS UAM.
// ===========================================================================
#pragma once
#include <stdio.h>
#include <String.h>
#define ALRT_Debug 133
#ifdef UAMDebug
#define DBGBUFF _buff
#define DbgPrint_(x) do { \
char _buff[256]; \
sprintf x; \
DebugStr(c2pstr(_buff)); \
}while(false)
#define Assert_(test) do { \
if (!(test)) { \
DbgPrint_((DBGBUFF, "Assertion failed: (%s) file: %s line: %d", \
#test, __FILE__, __LINE__)); \
} \
}while(false)
#define DBGPrintIfOSErr_(err) if (err != noErr) { \
DbgPrint_((DBGBUFF, "OSErr: %d, line: %d file: %s;g", \
err, __LINE__, __FILE__)); \
}
void UAM_DebugAlert(Str255 inErrStr, Str255 inFileName, long inLineNum);
#else
#define DbgPrint_(x)
#define Assert_(test)
#define DBGPrintIfOSErr_(err)
#endif
|