2010-12-08 13:07:58 +01:00
|
|
|
---
|
|
|
|
src/base/ftstream.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++--
|
|
|
|
1 file changed, 56 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
Index: freetype-2.4.2/src/base/ftstream.c
|
2009-11-10 09:55:12 +01:00
|
|
|
===================================================================
|
2010-12-08 13:07:58 +01:00
|
|
|
--- freetype-2.4.2.orig/src/base/ftstream.c
|
|
|
|
+++ freetype-2.4.2/src/base/ftstream.c
|
2007-08-24 01:05:25 +02:00
|
|
|
@@ -44,6 +44,17 @@
|
|
|
|
stream->close = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( void )
|
|
|
|
+ FT_New_Memory_Stream( FT_Library, FT_Byte*, FT_ULong, FT_Stream ) __attribute__((weak));
|
|
|
|
+ FT_BASE_DEF( void )
|
|
|
|
+ FT_New_Memory_Stream( FT_Library library,
|
|
|
|
+ FT_Byte* base,
|
|
|
|
+ FT_ULong size,
|
|
|
|
+ FT_Stream stream )
|
|
|
|
+ {
|
|
|
|
+ stream->memory = library->memory;
|
|
|
|
+ FT_Stream_OpenMemory( stream, (const FT_Byte*) base, size );
|
|
|
|
+ }
|
|
|
|
|
|
|
|
FT_BASE_DEF( void )
|
|
|
|
FT_Stream_Close( FT_Stream stream )
|
2010-04-01 03:04:23 +02:00
|
|
|
@@ -87,6 +98,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Seek_Stream(FT_Stream, FT_ULong) __attribute__((weak, alias("FT_Stream_Seek")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Error )
|
|
|
|
FT_Stream_Skip( FT_Stream stream,
|
2010-04-01 03:04:23 +02:00
|
|
|
@@ -98,6 +111,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return FT_Stream_Seek( stream, (FT_ULong)( stream->pos + distance ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Skip_Stream(FT_Stream, FT_Long) __attribute__((weak, alias("FT_Stream_Skip")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_Pos( FT_Stream stream )
|
2010-04-01 03:04:23 +02:00
|
|
|
@@ -114,6 +129,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return FT_Stream_ReadAt( stream, stream->pos, buffer, count );
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Read_Stream( FT_Stream, FT_Byte*, FT_ULong ) __attribute__((weak, alias("FT_Stream_Read")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Error )
|
|
|
|
FT_Stream_ReadAt( FT_Stream stream,
|
2010-04-01 03:04:23 +02:00
|
|
|
@@ -188,6 +205,8 @@
|
2009-11-10 09:55:12 +01:00
|
|
|
return read_bytes;
|
2007-08-24 01:05:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Read_Stream_At( FT_Stream, FT_ULong, FT_Byte*, FT_ULong) __attribute__((weak, alias("FT_Stream_ReadAt")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Error )
|
|
|
|
FT_Stream_ExtractFrame( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -210,7 +229,9 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
2010-12-08 13:07:58 +01:00
|
|
|
-
|
2007-08-24 01:05:25 +02:00
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Extract_Frame( FT_Stream, FT_ULong, FT_Byte** ) __attribute__((weak, alias("FT_Stream_ExtractFrame")));
|
2010-12-08 13:07:58 +01:00
|
|
|
+
|
2007-08-24 01:05:25 +02:00
|
|
|
FT_BASE_DEF( void )
|
|
|
|
FT_Stream_ReleaseFrame( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
FT_Byte** pbytes )
|
|
|
|
@@ -229,6 +250,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
*pbytes = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( void )
|
|
|
|
+ FT_Release_Frame( FT_Stream, FT_Byte** ) __attribute__((weak, alias("FT_Stream_ReleaseFrame")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Error )
|
|
|
|
FT_Stream_EnterFrame( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -307,6 +330,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Access_Frame( FT_Stream, FT_ULong ) __attribute__((weak, alias("FT_Stream_EnterFrame")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( void )
|
|
|
|
FT_Stream_ExitFrame( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -337,6 +362,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
stream->limit = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( void )
|
|
|
|
+ FT_Forget_Frame( FT_Stream ) __attribute__((weak, alias("FT_Stream_ExitFrame")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Char )
|
|
|
|
FT_Stream_GetChar( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -353,6 +380,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Char )
|
|
|
|
+ FT_Get_Char( FT_Stream ) __attribute__((weak, alias("FT_Stream_GetChar")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Short )
|
|
|
|
FT_Stream_GetShort( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -372,6 +401,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Short )
|
|
|
|
+ FT_Get_Short( FT_Stream ) __attribute__((weak, alias("FT_Stream_GetShort")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Short )
|
|
|
|
FT_Stream_GetShortLE( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -391,6 +422,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Short )
|
|
|
|
+ FT_Get_ShortLE( FT_Stream ) __attribute__((weak, alias("FT_Stream_GetShortLE")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_GetOffset( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -409,6 +442,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Long )
|
|
|
|
+ FT_Get_Offset( FT_Stream ) __attribute__((weak, alias("FT_Stream_GetOffset")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_GetLong( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -427,6 +462,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Long )
|
|
|
|
+ FT_Get_Long( FT_Stream ) __attribute__((weak, alias("FT_Stream_GetLong")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_GetLongLE( FT_Stream stream )
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -445,6 +482,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Long )
|
|
|
|
+ FT_Get_LongLE( FT_Stream ) __attribute__((weak, alias("FT_Stream_GetLongLE")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Char )
|
|
|
|
FT_Stream_ReadChar( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -482,6 +521,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Char )
|
|
|
|
+ FT_Read_Char( FT_Stream, FT_Error* ) __attribute__((weak, alias("FT_Stream_ReadChar")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Short )
|
|
|
|
FT_Stream_ReadShort( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -529,6 +570,9 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Short )
|
|
|
|
+ FT_Read_Short( FT_Stream, FT_Error* ) __attribute__((weak, alias("FT_Stream_ReadShort")));
|
2010-12-08 13:07:58 +01:00
|
|
|
+
|
2007-08-24 01:05:25 +02:00
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Short )
|
|
|
|
FT_Stream_ReadShortLE( FT_Stream stream,
|
2010-11-01 09:41:59 +01:00
|
|
|
@@ -576,6 +620,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Short )
|
|
|
|
+ FT_Read_ShortLE( FT_Stream, FT_Error* ) __attribute__((weak, alias("FT_Stream_ReadShortLE")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_ReadOffset( FT_Stream stream,
|
2010-11-01 09:41:59 +01:00
|
|
|
@@ -623,6 +669,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Long )
|
|
|
|
+ FT_Read_Offset( FT_Stream, FT_Error* ) __attribute__((weak, alias("FT_Stream_ReadOffset")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_ReadLong( FT_Stream stream,
|
2010-11-01 09:41:59 +01:00
|
|
|
@@ -670,6 +718,8 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Long )
|
|
|
|
+ FT_Read_Long( FT_Stream, FT_Error* ) __attribute__((weak, alias("FT_Stream_ReadLong")));
|
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Long )
|
|
|
|
FT_Stream_ReadLongLE( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -717,6 +767,9 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ FT_BASE_DEF( FT_Long )
|
|
|
|
+ FT_Read_LongLE( FT_Stream, FT_Error* ) __attribute__((weak, alias("FT_Stream_ReadLongLE")));
|
2010-12-08 13:07:58 +01:00
|
|
|
+
|
2007-08-24 01:05:25 +02:00
|
|
|
|
|
|
|
FT_BASE_DEF( FT_Error )
|
|
|
|
FT_Stream_ReadFields( FT_Stream stream,
|
2010-12-08 13:07:58 +01:00
|
|
|
@@ -860,5 +913,6 @@
|
2007-08-24 01:05:25 +02:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
+ FT_BASE_DEF( FT_Error )
|
|
|
|
+ FT_Read_Fields( FT_Stream, const FT_Frame_Field*, void* ) __attribute__((weak, alias("FT_Stream_ReadFields")));
|
|
|
|
/* END */
|