home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / doom_i / program / dmreject.exe / SOURCE.ZIP / DEBUG.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-01  |  824 b   |  47 lines

  1. #include <iostream.h>
  2. #include <fstream.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5.  
  6. #include "debug.hpp"
  7.  
  8.  
  9. cdebugclass::cdebugclass ()
  10. {
  11.      char tm[20];
  12.      char dt[20];
  13.      char *debug_file;
  14.  
  15.      debug_file = getenv ("DEBUG_DEVICE");
  16.      if (debug_file)
  17.      {
  18.           out.open (debug_file);
  19.  
  20.           if (out.good())
  21.           {
  22.                _strtime (tm);
  23.                _strdate (dt);
  24.                out << "Program Started at " << tm << " " << dt << "\n\n" << endl;
  25.           }
  26.      }
  27. }
  28.  
  29. cdebugclass::~cdebugclass ()
  30. {
  31.      char tm[20];
  32.      char dt[20];
  33.  
  34.      if (out.good())
  35.      {
  36.           _strtime (tm);
  37.           _strdate (dt);
  38.           out << "\nProgram Terminated at " << tm << " " << dt << "\n\n";
  39.  
  40.           out.close();
  41.      }
  42. }
  43.  
  44.  
  45.  
  46. cdebugclass cdebug;
  47.