home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 13 / CDA13.ISO / cdactual / demobin / share / program / C / ACTLIB12.ZIP / TVTOOLS.ZIP / TVSRC.ZIP / APPSYS.CPP next >
Encoding:
C/C++ Source or Header  |  1993-03-10  |  676 b   |  27 lines

  1. /*  Copyright (C) 1993   Marc Stern  (internet: stern@mble.philips.be)  */
  2.  
  3. #define Uses_TApplication
  4.  
  5. #include "tvtools.h"
  6. #include <conio.h>
  7. #include <stdlib.h>
  8. #include <process.h>
  9. #include <float.h>
  10.  
  11.  
  12.  
  13. void appSystem( char *cmd )
  14. {
  15.   TApplication::application->suspend();
  16.   clrscr();
  17.   if ( cmd ) system( cmd );
  18.   else { // Go to DOS and come back
  19.          char *comspec = getenv("COMSPEC");
  20.          if ( ! comspec ) comspec = "COMMAND";
  21.          spawnlpe( P_WAIT, comspec, comspec, "/e:2000", NULL, environ );
  22.        }
  23.   _fpreset();  // To reset math co-processor
  24.   TApplication::application->resume();
  25.   TApplication::application->redraw();
  26. }
  27.