muimaster.library: support Listview_List in List
[AROS.git] / compiler / posixc / __get_default_file.c
blobaf01705848ee291c6cdb53668acd6ccf2193f5e7
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Function to get a dos.library file handle associated with given file
6 descriptor.
7 */
9 #include "__fdesc.h"
11 /* FIXME: Do we need this function ? */
13 /*****************************************************************************
15 NAME */
17 int __get_default_file (
19 /* SYNOPSIS */
20 int file_descriptor,
21 long * file_handle)
23 /* FUNCTION
24 Gets dos.library file handle associated with a given file descriptor.
26 INPUTS
27 file_descriptor - the File Descriptor you wish to obtain the associated
28 file handle for.
29 file_handle - Pointer to store the associated file handle.
31 RESULT
32 !=0 on error, 0 on success.
34 NOTES
35 This function is not a part of the ISO C standard, it comes from clib2
36 project and was implemented to make porting of abc-shell easier.
37 Function should not be used in new code.
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 ******************************************************************************/
49 fdesc *fd;
51 if(
52 file_descriptor < 0 ||
53 (fd = __getfdesc(file_descriptor)) == NULL
55 return -1;
56 else
57 *(BPTR*)file_handle = fd->fcb->handle;
59 return 0;