/*                      QBCC Project

This source file is licensed under the GNU Lesser Public Licence which should be 
included with the distribution of this source.

*/
// Quick Basic Compatible Compiler File Structure
// Copyright 2000

#ifndef __QBFILE_H__
#define __QBFILE_H__

#include "stringh.h"
#include "stdlibh.h"

// File Modes
#define FL_APPEND	1
#define FL_BINARY	2
#define FL_INPUT	4
#define FL_OUTPUT	8


// Max Files allowed open
#define MAX_FILES	128


// File Structure
typedef struct {
	int used;				// File Used
	FILE *ptr;				// FILE ptr
	int FMode;				// File Mode
	int reclen;				// Record Length
} file_t;


extern file_t *Files;

// Prototypes

// file.c
int InitializeFileSystem(void);
int FreeFileSystem(void);
int *FREEFILE(void);


// open.c
int OPEN(string *filename, int ModeType, int *FileNumber);
void CLOSE(int *FileNumber);




#endif  //  __STDLIB_H__