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.

48 lines
805 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. debug.c
  5. Abstract:
  6. This module contains functions to output debug messages
  7. for tracing and error conditions. It is only available
  8. in checked builds.
  9. Author:
  10. Jeffrey C. Venable, Sr. (jeffv) 01-Jun-2001
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. #if (DBG)
  15. #include <stdio.h>
  16. void __cdecl
  17. TftpdOutputDebug(ULONG flag, CHAR *format, ...) {
  18. CHAR buffer[1024];
  19. va_list args;
  20. if (!(flag & globals.parameters.debugFlags))
  21. return;
  22. va_start(args, format);
  23. sprintf(buffer, "[%04X] ", GetCurrentThreadId());
  24. vsprintf(buffer + 7, format, args);
  25. va_end(args);
  26. OutputDebugString(buffer);
  27. } // TftpdOutputDebug()
  28. #endif // (DBG)