home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / alib / deletestdio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  1.1 KB  |  58 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: deletestdio.c,v 1.2 1997/01/27 00:16:36 ldp Exp $
  4.  
  5.     Desc: amiga.lib function DeleteStdIo()
  6.     Lang: english
  7. */
  8. #include <exec/memory.h>
  9.  
  10. /*****************************************************************************
  11.  
  12.     NAME */
  13. #include <exec/io.h>
  14. #include <proto/alib.h>
  15. #include <proto/exec.h>
  16.  
  17.     void DeleteStdIO (
  18.  
  19. /*  SYNOPSIS */
  20.     struct IOStdReq * io)
  21.  
  22. /*  FUNCTION
  23.     Delete a structure which was created by CreateStdIO().
  24.  
  25.     INPUTS
  26.     io - The value returned by CreateStdIO(). Must be
  27.         non-NULL.
  28.  
  29.     RESULT
  30.     None.
  31.  
  32.     NOTES
  33.  
  34.     EXAMPLE
  35.  
  36.     BUGS
  37.  
  38.     SEE ALSO
  39.     CreateStdIO()
  40.  
  41.     INTERNALS
  42.  
  43.     HISTORY
  44.  
  45. ******************************************************************************/
  46. {
  47. #   define ioreq    ((struct IORequest *)io)
  48.  
  49.     /* Write illegal values to some fields to enforce crashes */
  50.     ioreq->io_Message.mn_Node.ln_Type = -1L;
  51.  
  52.     ioreq->io_Device = (struct Device *)-1L;
  53.     ioreq->io_Unit   = (struct Unit *)-1L;
  54.  
  55.     FreeMem (ioreq, ioreq->io_Message.mn_Length);
  56. } /* DeleteStdIO */
  57.  
  58.