]> git.sur5r.net Git - cc65/blob - libsrc/common/_file.h
Rewrote fopen in assembler
[cc65] / libsrc / common / _file.h
1 /*
2  * _file.h
3  *
4  * (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org)
5  *
6  */
7
8
9
10 #ifndef __FILE_H
11 #define __FILE_H
12
13
14
15 #include <stdio.h>
16
17
18
19 /* Definition of struct _FILE */
20 struct _FILE {
21     char        f_fd;
22     char        f_flags;
23 };
24
25 /* File table. Beware: FOPEN_MAX is hardcoded in the ASM files! */
26 extern FILE _filetab [FOPEN_MAX];
27
28 /* Flags field */
29 #define _FCLOSED        0x00
30 #define _FOPEN          0x01
31 #define _FEOF           0x02
32 #define _FERROR         0x04
33 #define _FPUSHBACK      0x08
34
35
36
37 FILE* __fastcall__ _fopen (const char* name, const char* mode, FILE* f);
38 /* Open the specified file and fill the descriptor values into f */
39
40 FILE* _fdesc (void);
41 /* Find a free FILE descriptor */
42
43
44
45 /* End of _file.h */
46 #endif
47
48
49