2000-05-28 13:40:48 +00:00
|
|
|
/*
|
|
|
|
* _file.h
|
|
|
|
*
|
2002-03-24 13:26:18 +00:00
|
|
|
* (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org)
|
2000-05-28 13:40:48 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __FILE_H
|
|
|
|
#define __FILE_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Definition of struct _FILE */
|
|
|
|
struct _FILE {
|
2013-05-09 11:56:54 +00:00
|
|
|
char f_fd;
|
|
|
|
char f_flags;
|
2004-05-12 13:16:36 +00:00
|
|
|
unsigned char f_pushback;
|
2000-05-28 13:40:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* File table. Beware: FOPEN_MAX is hardcoded in the ASM files! */
|
2004-05-12 13:16:36 +00:00
|
|
|
extern FILE _filetab[FOPEN_MAX];
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
/* Flags field */
|
2013-05-09 11:56:54 +00:00
|
|
|
#define _FCLOSED 0x00
|
|
|
|
#define _FOPEN 0x01
|
|
|
|
#define _FEOF 0x02
|
|
|
|
#define _FERROR 0x04
|
2002-03-24 13:26:18 +00:00
|
|
|
#define _FPUSHBACK 0x08
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2002-11-23 17:52:38 +00:00
|
|
|
FILE* __fastcall__ _fopen (const char* name, const char* mode, FILE* f);
|
2000-05-28 13:40:48 +00:00
|
|
|
/* Open the specified file and fill the descriptor values into f */
|
|
|
|
|
|
|
|
FILE* _fdesc (void);
|
|
|
|
/* Find a free FILE descriptor */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* End of _file.h */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|