File diff r2162:7c64e21f12f9 → r2163:ae001e2aa5b0
fileio.c
Show inline comments
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "fileio.h"
 
#include "functions.h"
 
#include "macros.h"
 
#include "variables.h"
 
#if defined(UNIX) || defined(__OS2__)
 
#include <ctype.h> // required for tolower()
 
#endif
 

	
 
/*************************************************/
 
/* FILE IO ROUTINES ******************************/
 
/*************************************************/
 

	
 
#define FIO_BUFFER_SIZE 512
 

	
 
typedef struct {
 
	byte *buffer, *buffer_end;
 
	uint32 pos;
 
	FILE *cur_fh;
 
	FILE *handles[32];
 
	byte buffer_start[512];
 
} Fio;
 

	
 
static Fio _fio;
 

	
 
// Get current position in file
 
uint32 FioGetPos(void)