]> git.sur5r.net Git - cc65/blob - libsrc/common/_file.h
Implemented line wrap.
[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     unsigned char   f_pushback;
24 };
25
26 /* File table. Beware: FOPEN_MAX is hardcoded in the ASM files! */
27 extern FILE _filetab[FOPEN_MAX];
28
29 /* Flags field */
30 #define _FCLOSED        0x00
31 #define _FOPEN          0x01
32 #define _FEOF           0x02
33 #define _FERROR         0x04
34 #define _FPUSHBACK      0x08
35
36
37
38 FILE* __fastcall__ _fopen (const char* name, const char* mode, FILE* f);
39 /* Open the specified file and fill the descriptor values into f */
40
41 FILE* _fdesc (void);
42 /* Find a free FILE descriptor */
43
44
45
46 /* End of _file.h */
47 #endif
48
49
50