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

  1. /***************************************
  2. *  CONsole READ v1.01
  3. *  © Timm Martin
  4. *  All Rights Reserved
  5. ****************************************/
  6.  
  7. #include <exec/io.h>
  8. #include <exec/types.h>
  9. #include <console/console.h>
  10. #include <console/functions.h>
  11.  
  12. ULONG con_read( rreq, input_buffer )
  13.   struct IOStdReq *rreq;
  14.   UBYTE *input_buffer;
  15. {
  16.   void SendIO();  /* exec.library */
  17.  
  18.   rreq->io_Command = CMD_READ;
  19.   rreq->io_Data    = (APTR)input_buffer;
  20.   rreq->io_Length  = CONSOLE_BUFFER_SIZE;
  21.   /* the buffer should be declared to be at least CONSOLE_BUFFER_SIZE */
  22.   SendIO( rreq );
  23.  
  24.   return (rreq->io_Actual);
  25. }
  26.