rom/exec/restoretaskstorage.c: Don't restore ETask data
[AROS.git] / compiler / clib / __fdesc.h
blob612bc05c9e5a9768cc14048d7b8922bf387506e1
1 #ifndef ___FDESC_H
2 #define ___FDESC_H
4 /*
5 Copyright © 1995-2012, 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 struct aroscbase;
35 int __register_init_fdarray(struct aroscbase *base);
36 int __getfdslots(void);
37 void __getfdarray(APTR *arrayptr, int *slotsptr);
38 void __setfdarray(APTR array, int slots);
39 void __setfdarraybase(struct aroscbase *base);
40 fdesc *__getfdesc(register int fd);
41 void __setfdesc(register int fd, fdesc *fdesc);
42 int __getfdslot(int wanted_fd);
43 int __getfirstfd(register int startfd);
44 int __open(int wanted_fd, const char *pathname, int flags, int mode);
45 void __updatestdio(void);
46 LONG __oflags2amode(int flags);
47 fdesc *__alloc_fdesc(void);
48 void __free_fdesc(fdesc *fdesc);
49 void __close_on_exec_fdescs(void);
51 #endif /* ___FDESC_H */