home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / dprintf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  912 b   |  41 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  2.  
  3. //===============================================================
  4. //  MODULE: dprintf()
  5. //
  6. //  HISTORY:
  7. //  Tom McConnell   01/18/93    Created.
  8. //  raypa           07/09/93    ifdef DEBUG.
  9. //===============================================================
  10.  
  11. #include <string.h>
  12. #include <stdio.h>
  13. #include <windows.h>
  14.  
  15. #ifdef DEBUG
  16.  
  17. //===============================================================
  18. //  dprintf()
  19. //    
  20. //  Handles dumping info to OutputDebugString
  21. //
  22. //  HISTORY:
  23. //
  24. //  Tom McConnell   1/18/93     Created
  25. //===============================================================
  26.  
  27. static void dprintf(char *format, ...)
  28. {
  29.   va_list args;
  30.   char    buffer[255];
  31.  
  32.   va_start(args,format);
  33.  
  34.   strcpy(buffer + vsprintf(buffer,format,args), "\r\n");
  35.  
  36.   OutputDebugString(buffer);
  37. }
  38.  
  39. #endif
  40. #pragma option pop /*P_O_Pop*/
  41.