29 #include FT_CONFIG_CONFIG_H
30 #include FT_INTERNAL_DEBUG_H
31 #include FT_INTERNAL_STREAM_H
140 #ifndef FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT
149 #define FT_COMPONENT trace_io
153 #define STREAM_FILE( stream ) ( (FT_FILE*)stream->descriptor.pointer )
172 stream->descriptor.pointer =
NULL;
204 unsigned long count )
209 if ( !count && offset > stream->size )
214 if ( stream->pos != offset )
217 return (
unsigned long)
ft_fread( buffer, 1, count, file );
225 const char* filepathname )
231 return FT_Err_Invalid_Stream_Handle;
233 stream->descriptor.pointer =
NULL;
234 stream->pathname.pointer = (
char*)filepathname;
238 stream->close =
NULL;
240 file =
ft_fopen( filepathname,
"rb" );
244 " could not open `%s'\n", filepathname ));
246 return FT_Err_Cannot_Open_Resource;
254 FT_ERROR((
" opened `%s' but zero-sized\n", filepathname ));
256 return FT_Err_Cannot_Open_Stream;
260 stream->descriptor.pointer =
file;
265 FT_TRACE1((
" opened `%s' (%d bytes) successfully\n",
266 filepathname, stream->size ));
273 #ifdef FT_DEBUG_MEMORY
299 #ifdef FT_DEBUG_MEMORY
300 ft_mem_debug_init( memory );
313 #ifdef FT_DEBUG_MEMORY
314 ft_mem_debug_done( memory );
ft_free(FT_Memory memory, void *block)
#define FT_TRACE1(varformat)
#define FT_ERROR(varformat)
ft_ansi_stream_io(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count)
EGLContext EGLenum EGLClientBuffer buffer
ft_alloc(FT_Memory memory, long size)
ft_realloc(FT_Memory memory, long cur_size, long new_size, void *block)
#define FT_CALLBACK_DEF(x)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
ft_ansi_stream_close(FT_Stream stream)
#define STREAM_FILE(stream)
FT_Stream_Open(FT_Stream stream, const char *filepathname)
FT_Done_Memory(FT_Memory memory)