20 #include FT_INTERNAL_STREAM_H 21 #include FT_INTERNAL_DEBUG_H 31 #define FT_COMPONENT trace_stream 68 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
75 else if ( pos >
stream->size )
78 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
96 return FT_THROW( Invalid_Stream_Operation );
128 if ( pos >=
stream->size )
131 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
134 return FT_THROW( Invalid_Stream_Operation );
141 read_bytes =
stream->size - pos;
142 if ( read_bytes >
count )
148 stream->pos = pos + read_bytes;
150 if ( read_bytes <
count )
153 " invalid read; expected %lu bytes, got %lu\n",
154 count, read_bytes ));
179 if ( read_bytes >
count )
185 stream->pos += read_bytes;
222 #ifdef FT_DEBUG_MEMORY 254 " frame size (%lu) larger than stream size (%lu)\n",
261 #ifdef FT_DEBUG_MEMORY 273 if ( read_bytes <
count )
276 " invalid read; expected %lu bytes, got %lu\n",
277 count, read_bytes ));
284 stream->pos += read_bytes;
293 " invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",
329 #ifdef FT_DEBUG_MEMORY 479 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
526 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
572 FT_ERROR((
"FT_Stream_ReadUShortLE:" 573 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
620 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
667 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
714 " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
732 return FT_THROW( Invalid_Argument );
744 switch ( fields->value )
762 if ( cursor + len >
stream->limit )
770 p = (
FT_Byte*)structure + fields->offset;
832 p = (
FT_Byte*)structure + fields->offset;
833 switch ( fields->size )
858 if ( frame_accessed )
FT_Stream_Skip(FT_Stream stream, FT_Long distance)
FT_Stream_TryRead(FT_Stream stream, FT_Byte *buffer, FT_ULong count)
FT_Stream_ReadAt(FT_Stream stream, FT_ULong pos, FT_Byte *buffer, FT_ULong count)
FT_Stream_GetUOffset(FT_Stream stream)
ft_mem_free(FT_Memory memory, const void *P)
FT_Stream_Seek(FT_Stream stream, FT_ULong pos)
FT_Stream_ReleaseFrame(FT_Stream stream, FT_Byte **pbytes)
#define FT_NEXT_ULONG_LE(buffer)
FT_Stream_Close(FT_Stream stream)
return FT_THROW(Missing_Property)
#define FT_NEXT_BYTE(buffer)
ft_mem_qalloc(FT_Memory memory, FT_Long size, FT_Error *p_error)
#define FT_QALLOC(ptr, size)
FT_Stream_GetChar(FT_Stream stream)
FT_Stream_ExtractFrame(FT_Stream stream, FT_ULong count, FT_Byte **pbytes)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
FT_Stream_Read(FT_Stream stream, FT_Byte *buffer, FT_ULong count)
#define FT_ERROR(varformat)
#define FT_ASSERT(condition)
FT_Stream_GetUShort(FT_Stream stream)
FT_Stream_ExitFrame(FT_Stream stream)
FT_Stream_GetULongLE(FT_Stream stream)
FT_Stream_ReadUShortLE(FT_Stream stream, FT_Error *error)
FT_Stream_GetULong(FT_Stream stream)
FT_Stream_ReadUOffset(FT_Stream stream, FT_Error *error)
FT_Stream_ReadUShort(FT_Stream stream, FT_Error *error)
FT_Stream_EnterFrame(FT_Stream stream, FT_ULong count)
GLsizei GLsizei GLfloat distance
GLsizei const GLfloat * value
#define FT_NEXT_UOFF3(buffer)
#define FT_NEXT_USHORT_LE(buffer)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_NEXT_USHORT(buffer)
#define FT_FRAME_OP_SIGNED
FT_Stream_ReadFields(FT_Stream stream, const FT_Frame_Field *fields, void *structure)
#define FT_NEXT_UOFF3_LE(buffer)
#define FT_NEXT_ULONG(buffer)
FT_Stream_Pos(FT_Stream stream)
FT_Stream_ReadChar(FT_Stream stream, FT_Error *error)
GLuint GLuint GLsizei count
FT_Stream_GetUShortLE(FT_Stream stream)
#define FT_MEM_COPY(dest, source, count)
FT_Stream_ReadULongLE(FT_Stream stream, FT_Error *error)
FT_Stream_ReadULong(FT_Stream stream, FT_Error *error)
FT_Stream_OpenMemory(FT_Stream stream, const FT_Byte *base, FT_ULong size)