Updated PCI IDs to latest snapshot.
[tangerine.git] / compiler / clib / __open.h
blobdbfd48e04a5d2988cebcd27ebd5b2021b6459640
1 #ifndef ___OPEN_H
2 #define ___OPEN_H
4 /*
5 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: file descriptors handling internals - header file
9 Lang: english
12 #include <dos/dos.h>
14 /* file control block - one per file handle */
15 typedef struct _fcb
17 BPTR fh;
18 int flags;
19 unsigned int opencount;
20 char isdir;
21 unsigned char privflags;
22 } fcb;
24 /* privflags */
25 #define _FCB_DONTCLOSE_FH 1
27 /* file descriptor structure - one per descriptor */
28 typedef struct _fdesc
30 fcb *fcb;
31 int fdflags;
32 } fdesc;
34 int __register_init_fdarray(fdesc **fdarray, int numslots);
35 fdesc *__getfdesc(register int fd);
36 void __setfdesc(register int fd, fdesc *fdesc);
37 int __getfdslot(int wanted_fd);
38 int __getfirstfd(register int startfd);
39 int __open(int wanted_fd, const char *pathname, int flags, int mode);
40 void __updatestdio(void);
41 LONG __oflags2amode(int flags);
42 fdesc *__alloc_fdesc(void);
43 void __free_fdesc(fdesc *fdesc);
44 #endif