Reverted deallocation of existing "new" FD (introduced in r49699). It's
[AROS.git] / rom / dos / isinteractive.c
blob3c013aaa15c9c88667d4a3ebec2e52266f0b9adc
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Query a filesystem for interactiveness.
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(LONG, IsInteractive,
18 /* SYNOPSIS */
19 AROS_LHA(BPTR, file, D1),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 36, Dos)
24 /* FUNCTION
25 Check if file is bound to an interactive device such as a console
26 or shell window.
28 INPUTS
29 file - filehandle
31 RESULT
32 != 0 if the file is interactive, 0 if it is not.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
42 INTERNALS
44 *****************************************************************************/
46 AROS_LIBFUNC_INIT
48 /* Get pointer to filehandle */
49 struct FileHandle *fh=(struct FileHandle *)BADDR(file);
51 if (fh == NULL)
52 return DOSFALSE;
54 return (LONG)fh->fh_Interactive; /* 100% identical to official ROM behavior */
56 AROS_LIBFUNC_EXIT
57 } /* IsInteractive */