Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
1.6 KiB

// =========================================================================== // UAMDebug.h © 1997 Microsoft Corp. All rights reserved. // =========================================================================== // Debugging routines for MS UAM. // =========================================================================== #pragma once #include "UAMUtils.h" #include <stdio.h> #include <String.h> #include <macstrsafe.h> #ifdef UAMDebug #define DBGBUFF _buff,sizeof(_buff) #ifdef UAM_TARGET_CARBON #define DbgPrint_(x) do { \ char _buff[256]; \ StringCbPrintf x; \ printf("%s%s", _buff, "\n"); \ }while(false) #else #define DbgPrint_(x) do { \ char _buff[256]; \ StringCbPrintf x; \ StringCbCat(_buff, sizeof(_buff), ";"); \ StringCbCat(_buff, sizeof(_buff), "g"); \ DebugStr(_c2pstr(_buff)); \ }while(false) #endif //UAM_TARGET_CARBON #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", \ err, __LINE__, __FILE__)); \ } #else #define DbgPrint_(x) #define Assert_(test) #define DBGPrintIfOSErr_(err) #endif