home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / duucp-1.17 / AU-117b4-src.lha / src / lib / mntreq.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-24  |  644 b   |  34 lines

  1. /*
  2.  *  MNTREQ.C
  3.  *
  4.  *  (C) Copyright 1989-1990 by Matthew Dillon,    All Rights Reserved.
  5.  */
  6.  
  7. #include <exec/types.h>
  8. #include <libraries/dos.h>
  9. #include <libraries/dosextens.h>
  10. #include <stdio.h>
  11. #include "config.h"
  12.  
  13. Prototype void mountrequest (int);
  14.  
  15. void
  16. mountrequest (int bool)
  17. {
  18.     static APTR
  19.         original_pr_WindowPtr = NULL;
  20.     register struct Process
  21.         *proc;
  22.  
  23.     proc = (struct Process *) FindTask (NULL);
  24.     if (!bool && proc->pr_WindowPtr != (APTR) -1) {
  25.         original_pr_WindowPtr = proc->pr_WindowPtr;
  26.         proc->pr_WindowPtr = (APTR) -1;
  27.     }
  28.  
  29.     if (bool && proc->pr_WindowPtr == (APTR) -1)
  30.         proc->pr_WindowPtr = original_pr_WindowPtr;
  31.  
  32.     return;
  33. }
  34.