Added a test for MUIA_Listview_SelectChange.
[AROS.git] / rom / dos / setconsoletask.c
blobc3899fe8e340065aab71ee49d0196b4ad1fefb39
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Set the console handler for the current process.
6 Lang: english
7 */
8 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
16 #include <dos/dosextens.h>
17 #include <proto/dos.h>
19 AROS_LH1(struct MsgPort *, SetConsoleTask,
21 /* SYNOPSIS */
22 AROS_LHA(struct MsgPort *, handler, D1),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 86, Dos)
27 /* FUNCTION
28 Set the console handler for the current process, and return the
29 old handler.
31 INPUTS
32 handler - The new console handler for the process.
34 RESULT
35 The address of the old handler.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 GetConsoleTask()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 APTR old;
53 struct Process *pr;
55 pr = (struct Process *)FindTask(NULL);
56 ASSERT_VALID_PROCESS(pr);
58 old = pr->pr_ConsoleTask;
59 pr->pr_ConsoleTask = handler;
61 return old;
63 AROS_LIBFUNC_EXIT
64 } /* SetConsoleTask */