windows-nt/Source/XPSP1/NT/net/sfm/uam/uam5src/uamsrc/uamdebug.h

1 line
1.2 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
// =========================================================================== // 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