Source code of Windows XP (NT5)
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.

57 lines
1.1 KiB

  1. /* Copyright (c) 1991-1994 Microsoft Corporation */
  2. /*
  3. debug.c
  4. Support code for the dprintf routines.
  5. Note that all of this is conditional on the DBG flag
  6. */
  7. #include <windows.h> // private include file
  8. #include <mmsystem.h>
  9. #include "mcicda.h"
  10. #include "cda.h"
  11. #include "cdio.h"
  12. #include <stdio.h>
  13. #include <stdarg.h>
  14. #if DBG
  15. int DebugLevel = 1;
  16. /***************************************************************************
  17. @doc INTERNAL
  18. @api void | mcicdaDbgOut | This function sends output to the current
  19. debug output device.
  20. @parm LPSTR | lpszFormat | Pointer to a printf style format string.
  21. @parm ??? | ... | Args.
  22. @rdesc There is no return value.
  23. ****************************************************************************/
  24. void mcicdaDbgOut(LPSTR lpszFormat, ...)
  25. {
  26. char buf[512];
  27. UINT n;
  28. va_list va;
  29. n = wsprintfA(buf, "MCICDA: (tid %x) ", GetCurrentThreadId());
  30. va_start(va, lpszFormat);
  31. n += vsprintf(buf+n, lpszFormat, va);
  32. va_end(va);
  33. buf[n++] = '\n';
  34. buf[n] = 0;
  35. OutputDebugStringA(buf);
  36. Sleep(0);
  37. }
  38. #endif // DBG