Fix for the (stupid) case of app (always) passing
[tangerine.git] / rom / dos / selecterror.c
blobb1990b42993fff8a00e10e65422062bc2c22d59e
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/dos.h>
16 AROS_LH1(BPTR, SelectError,
18 /* SYNOPSIS */
19 AROS_LHA(BPTR, fh, D1),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 144, Dos)
24 /* FUNCTION
25 Sets the current error stream returned by Error() to a new
26 value. Returns the old error stream.
28 INPUTS
29 fh - New error stream.
31 RESULT
32 Old error stream handle.
34 NOTES
35 This function is AROS specific
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
48 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
50 BPTR old;
52 /* Get pointer to process structure */
53 struct Process *me=(struct Process *)FindTask(NULL);
55 /* Nothing spectacular */
56 old=me->pr_CES;
57 me->pr_CES=fh;
58 return old;
59 AROS_LIBFUNC_EXIT
60 } /* SelectInput */