home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff236.lzh / DiskHandler / process.c < prev    next >
C/C++ Source or Header  |  1989-08-09  |  2KB  |  68 lines

  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2. /* |_o_o|\\ Copyright (c) 1987 The Software Distillery.  All Rights Reserved */
  3. /* |. o.| || This program may not be distributed without the permission of   */
  4. /* | .  | || the authors:                                          BBS:      */
  5. /* | o  | ||   John Toebes     Dave Baker                                    */
  6. /* |  . |//                                                                  */
  7. /* ======                                                                    */
  8. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  9. /* Process Control */
  10.  
  11. /* ActDie ActInhibit ActFlush ActTimer */
  12. #include "handler.h"
  13.  
  14. void ActDie(global, pkt)
  15. GLOBAL global;
  16. struct DosPacket *pkt;              /* a pointer to the dos packet sent       */
  17. {
  18.    BUG(("ActDie\n"));
  19.    global->run = -1;
  20. }
  21.  
  22. void ActInhibit(global, pkt)
  23. GLOBAL global;
  24. struct DosPacket *pkt;              /* a pointer to the dos packet sent       */
  25. {
  26.    BUG(("ActInhibit: %ld\n", pkt->dp_Arg1));
  27.    if (pkt->dp_Arg1 == DOS_TRUE)
  28.       DisMount(global);
  29.    else
  30.       Mount(global);
  31.    pkt->dp_Res1 = DOS_TRUE;
  32. }
  33.  
  34. void ActFlush(global, pkt)
  35. GLOBAL global;
  36. struct DosPacket *pkt;
  37. {
  38.    BUG(("ActFlush\n"));
  39.    FlushBuffers(global, 0);
  40.    Motor(global, 0);
  41. }
  42.  
  43. void ActTimer(global, pkt)
  44. GLOBAL global;
  45. struct DosPacket *pkt;        /* a pointer to the dos packet sent */
  46. {
  47.    BUG(("ActTimer\n"));
  48.    if (global->deviotimeout == 0)
  49.       {
  50.       WriteBitMap(global);
  51.       FlushBuffers(global,0);
  52.       Motor(global,0);
  53.       }
  54.    else
  55.       {
  56.       if (global->deviotimeout > 0)
  57.          global->deviotimeout--;
  58.       }
  59.  
  60.    if (global->run == -1)
  61.       global->run = 0;
  62.    else
  63.       PostTimerReq(global);
  64.  
  65.    /* Prevent them from replying to the message */
  66.    global->reply = 0;
  67. }
  68.