home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / dprintf.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  831b  |  39 lines

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