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.

31 lines
888 B

  1. // dbgwrap.h
  2. // wrapper for outputting debug info
  3. void LogUIMessage(LPSTR szStr) {
  4. #ifdef _DEBUG
  5. OutputDebugString(szStr);
  6. #endif
  7. }
  8. void PASvprintf(LPCSTR lpszFmt, va_list lpParms) {
  9. char rgchBuf[8192];
  10. // Get it into a string
  11. vsprintf(rgchBuf, lpszFmt, lpParms);
  12. LogUIMessage(rgchBuf);
  13. }
  14. void PASprintf(LPCSTR lpszFmt, ...) {
  15. va_list arglist;
  16. va_start(arglist, lpszFmt);
  17. PASvprintf(lpszFmt, arglist);
  18. va_end(arglist);
  19. }
  20. //void PASprintf(LPCSTR lpszFormat, ...);
  21. #ifdef _DEBUG
  22. #define DEBUGMSG(cond,printf_exp) ((void)((cond)?(PASprintf printf_exp),1:0))
  23. #else
  24. #define DEBUGMSG(cond,printf_exp)
  25. #endif
  26. //Eg:
  27. //DEBUGMSG(1, ("%C", ptok->rgwch[i]));
  28. //DEBUGMSG(1, ("\r\n 0:%d 1:%d 2:%d 3:%d 4:%d\r\n", pch->rgdwCompressLen[0], pch->rgdwCompressLen[1], pch->rgdwCompressLen[2], pch->rgdwCompressLen[3], pch->rgdwCompressLen[4]));