Changeset - r10779:f531a4ee1b40
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-01-16 16:29:07
rubidium@openttd.org
(svn r15112) -Fix (r15108): transform should include algorithm as that's where it's from. Furthermore not including it gives compile errors for some
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/fileio.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file fileio.cpp Standard In/Out file operations */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "fileio_func.h"
 
#include "variables.h"
 
#include "debug.h"
 
#include "fios.h"
 
#include "core/alloc_func.hpp"
 
#include "core/math_func.hpp"
 
#include "string_func.h"
 
#include "tar_type.h"
 
#ifdef WIN32
 
#include <windows.h>
 
#else
 
#include <pwd.h>
 
#include <unistd.h>
 
#endif
 
#include <sys/stat.h>
 
#include <algorithm>
 

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

	
 
#define FIO_BUFFER_SIZE 512
 

	
 
struct Fio {
 
	byte *buffer, *buffer_end;             ///< position pointer in local buffer and last valid byte of buffer
 
	size_t pos;                            ///< current (system) position in file
 
	FILE *cur_fh;                          ///< current file handle
 
	const char *filename;                  ///< current filename
 
	FILE *handles[MAX_FILE_SLOTS];         ///< array of file handles we can have open
 
	byte buffer_start[FIO_BUFFER_SIZE];    ///< local buffer when read from file
 
	const char *filenames[MAX_FILE_SLOTS]; ///< array of filenames we (should) have open
 
	char *shortnames[MAX_FILE_SLOTS];///< array of short names for spriteloader's use
 
#if defined(LIMITED_FDS)
 
	uint open_handles;                     ///< current amount of open handles
 
	uint usage_count[MAX_FILE_SLOTS];      ///< count how many times this file has been opened
 
#endif /* LIMITED_FDS */
 
};
 

	
 
static Fio _fio;
 

	
0 comments (0 inline, 0 general)