2 Copyright © 1995-2001, 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 *****************************************************************************/
48 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
50 /* Get pointer to filehandle */
51 struct FileHandle
*fh
=(struct FileHandle
*)BADDR(file
);
53 /* Get pointer to I/O request. Use stackspace for now. */
54 struct IOFileSys iofs
;
56 /* Prepare I/O request. */
57 InitIOFS(&iofs
, FSA_IS_INTERACTIVE
, DOSBase
);
59 iofs
.IOFS
.io_Device
= fh
->fh_Device
;
60 iofs
.IOFS
.io_Unit
= fh
->fh_Unit
;
62 /* Send the request. */
66 if(iofs
.io_DosError
!= 0)
69 return iofs
.io_Union
.io_IS_INTERACTIVE
.io_IsInteractive
;