update gcc 5 patch for 20150222 snapshot
[AROS.git] / rom / dos / setmode.c
blobe751b7cf42c82e5a576203a04c99a010a11e33dc
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Set the current mode of a console device.
6 Lang: english
7 */
8 #include "dos_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/dos.h>
15 AROS_LH2(LONG, SetMode,
17 /* SYNOPSIS */
18 AROS_LHA(BPTR, fh, D1),
19 AROS_LHA(LONG, mode, D2),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 71, Dos)
24 /* FUNCTION
25 SetMode() can be used to change a console handler between
26 RAW: mode and CON: mode.
28 INPUTS
29 fh - The filehandle describing the console.
30 mode - The new mode of the console:
31 1 - RAW: mode
32 0 - CON: mode
34 RESULT
35 This function will return whether it succeeded:
37 == DOSTRUE console mode changed
38 != DOSTRUE console mode change failed.
40 NOTES
42 EXAMPLE
44 BUGS
46 SEE ALSO
48 INTERNALS
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct FileHandle *afh = BADDR(fh);
55 LONG status;
57 status = dopacket1(DOSBase, NULL, afh->fh_Type, ACTION_SCREEN_MODE, mode);
59 return status;
61 AROS_LIBFUNC_EXIT
62 } /* SetMode */