home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / source / gblanker3.5.src.lha / GSource / Blankers / Executor / blank.c next >
Encoding:
C/C++ Source or Header  |  1994-10-04  |  1.2 KB  |  64 lines

  1. /*
  2.  *  Copyright (c) 1994 Michael D. Bayne.
  3.  *  All rights reserved.
  4.  *
  5.  *  Please see the documentation accompanying the distribution for distribution
  6.  *  and disclaimer information.
  7.  */
  8.  
  9. #include <exec/memory.h>
  10. #include <dos/dostags.h>
  11.  
  12. #include <clib/exec_protos.h>
  13. #include <clib/dos_protos.h>
  14. #include <clib/alib_protos.h>
  15.  
  16. #include "Executor.h"
  17. #include "//defs.h"
  18. #include "/main.h"
  19.  
  20. struct ModulePrefs
  21. {
  22.     BYTE StartString[128];
  23.     BYTE StopString[128];
  24. };
  25.  
  26. extern struct ModulePrefs nP;
  27.  
  28. struct Screen *ModuleScreen( VOID )
  29. {
  30.     return 0L;
  31. }
  32.  
  33. LONG Blank( VOID *Prefs )
  34. {
  35.     struct ModulePrefs *wP;
  36.     BPTR InFile, OutFile;
  37.     LONG RetVal;
  38.     
  39.     if( ExecutorWnd )
  40.         wP = &nP;
  41.     else
  42.         wP = ( struct ModulePrefs * )Prefs;
  43.     
  44.     InFile = Open( "NIL:", MODE_OLDFILE );
  45.     OutFile = Open( "NIL:", MODE_OLDFILE );
  46.     SystemTags( wP->StartString, NP_Name, "!* StealthProcess *!",
  47.                SYS_Asynch, TRUE, SYS_Input, InFile, SYS_Output, OutFile,
  48.                TAG_END );
  49.  
  50.     do
  51.     {
  52.         Delay( 5 );
  53.         RetVal = ContinueBlanking();
  54.     }
  55.     while( RetVal == OK );
  56.  
  57.     InFile = Open( "NIL:", MODE_OLDFILE );
  58.     OutFile = Open( "NIL:", MODE_OLDFILE );
  59.     SystemTags( wP->StopString, SYS_Asynch, TRUE, SYS_Input, InFile,
  60.                SYS_Output, OutFile, TAG_END );
  61.  
  62.     return RetVal;
  63. }
  64.