2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Query a filesystem for interactiveness.
8 #include <proto/exec.h>
9 #include <dos/filesystem.h>
10 #include "dos_intern.h"
12 /*****************************************************************************
15 #include <proto/dos.h>
17 AROS_LH1(BOOL
, IsInteractive
,
20 AROS_LHA(BPTR
, file
, D1
),
23 struct DosLibrary
*, DOSBase
, 36, Dos
)
26 Check if file is bound to an interactive device such as a console
33 != 0 if the file is interactive, 0 if it is not.
45 *****************************************************************************/
49 /* Get pointer to filehandle */
50 struct FileHandle
*fh
=(struct FileHandle
*)BADDR(file
);
52 /* Get pointer to I/O request. Use stackspace for now. */
53 struct IOFileSys iofs
;
55 /* Prepare I/O request. */
56 InitIOFS(&iofs
, FSA_IS_INTERACTIVE
, DOSBase
);
58 iofs
.IOFS
.io_Device
= fh
->fh_Device
;
59 iofs
.IOFS
.io_Unit
= fh
->fh_Unit
;
61 /* Send the request. */
65 if(iofs
.io_DosError
!= 0)
68 return iofs
.io_Union
.io_IS_INTERACTIVE
.io_IsInteractive
;