home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d4xx / d430 / smartfields.lha / SmartFields / Functions / con_open.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-11  |  700 b   |  28 lines

  1. /***************************************
  2. *  CONsole OPEN v1.13
  3. *  © Copyright Timm Martin
  4. *  All Rights Reserved
  5. ****************************************/
  6.  
  7. #include <exec/io.h>
  8. #include <exec/types.h>
  9. #include <intuition/intuition.h>
  10. #include <console/functions.h>
  11.  
  12. long con_open( window, wreq, rreq )
  13.   struct Window *window;
  14.   struct IOStdReq *wreq;
  15.   struct IOStdReq *rreq;
  16. {
  17.   long error;         /* error in opening console */
  18.   long OpenDevice();  /* exec.library */
  19.  
  20.   wreq->io_Data    = (APTR)window;
  21.   wreq->io_Length  = sizeof(*window);
  22.   error = OpenDevice( "console.device", 0L, wreq, NULL );
  23.   rreq->io_Device  = wreq->io_Device;
  24.   rreq->io_Unit    = wreq->io_Unit;
  25.  
  26.   return (error);
  27. }
  28.