preserve the link register
[AROS.git] / compiler / alib / deletestdio.c
blob8aba61179a1b2a3f62922b350637bda6778b8bb9
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: amiga.lib function DeleteStdIo()
6 Lang: english
7 */
8 #include <exec/memory.h>
10 /*****************************************************************************
12 NAME */
13 #include <exec/io.h>
14 #include <proto/alib.h>
15 #include <proto/exec.h>
17 void DeleteStdIO (
19 /* SYNOPSIS */
20 struct IOStdReq * io)
22 /* FUNCTION
23 Delete a structure which was created by CreateStdIO().
25 INPUTS
26 io - The value returned by CreateStdIO(). Must be
27 non-NULL.
29 RESULT
30 None.
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
39 CreateStdIO()
41 INTERNALS
43 HISTORY
45 ******************************************************************************/
47 # define ioreq ((struct IORequest *)io)
48 /* Write illegal values to some fields to enforce crashes */
49 ioreq->io_Message.mn_Node.ln_Type = -1L;
51 ioreq->io_Device = (struct Device *)-1L;
52 ioreq->io_Unit = (struct Unit *)-1L;
54 FreeMem (ioreq, ioreq->io_Message.mn_Length);
55 } /* DeleteStdIO */