* include/freetype/ftconfig.h, src/*/*.c: changed the definition and

uses of the FT_CALLBACK_DEF macro in order to support 16-bit compilers
This commit is contained in:
David Turner 2001-06-27 09:26:46 +00:00
parent 890f313b37
commit dee781342b
20 changed files with 232 additions and 229 deletions

View File

@ -1,3 +1,8 @@
2001-06-27 David Turner <david@freetype.org>
* include/freetype/ftconfig.h, src/*/*.c: changed the definition and
uses of the FT_CALLBACK_DEF macro in order to support 16-bit compilers
2001-06-26 Wolfgang Domröse <porthos.domroese@harz.de> 2001-06-26 Wolfgang Domröse <porthos.domroese@harz.de>
* include/freetype/internal/ftstream.h (FT_GET_OFF3_LE): Fix typo. * include/freetype/internal/ftstream.h (FT_GET_OFF3_LE): Fix typo.

View File

@ -91,9 +91,9 @@
/* <Return> */ /* <Return> */
/* The address of newly allocated block. */ /* The address of newly allocated block. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void*)
void* ft_alloc( FT_Memory memory, ft_alloc( FT_Memory memory,
long size ) long size )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
@ -121,11 +121,11 @@
/* <Return> */ /* <Return> */
/* The address of the reallocated memory block. */ /* The address of the reallocated memory block. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void*)
void* ft_realloc( FT_Memory memory, ft_realloc( FT_Memory memory,
long cur_size, long cur_size,
long new_size, long new_size,
void* block ) void* block )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
FT_UNUSED( cur_size ); FT_UNUSED( cur_size );
@ -147,9 +147,9 @@
/* */ /* */
/* block :: The address of block in memory to be freed. */ /* block :: The address of block in memory to be freed. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_free( FT_Memory memory, ft_free( FT_Memory memory,
void* block ) void* block )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
@ -189,8 +189,8 @@
/* <Input> */ /* <Input> */
/* stream :: A pointer to the stream object. */ /* stream :: A pointer to the stream object. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_close_stream( FT_Stream stream ) ft_close_stream( FT_Stream stream )
{ {
munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size ); munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );

View File

@ -91,9 +91,9 @@
/* <Return> */ /* <Return> */
/* The address of newly allocated block. */ /* The address of newly allocated block. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void*)
void* ft_alloc( FT_Memory memory, ft_alloc( FT_Memory memory,
long size ) long size )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
@ -121,11 +121,11 @@
/* <Return> */ /* <Return> */
/* The address of the reallocated memory block. */ /* The address of the reallocated memory block. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void*)
void* ft_realloc( FT_Memory memory, ft_realloc( FT_Memory memory,
long cur_size, long cur_size,
long new_size, long new_size,
void* block ) void* block )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
FT_UNUSED( cur_size ); FT_UNUSED( cur_size );
@ -147,9 +147,9 @@
/* */ /* */
/* block :: The address of block in memory to be freed. */ /* block :: The address of block in memory to be freed. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_free( FT_Memory memory, ft_free( FT_Memory memory,
void* block ) void* block )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
@ -189,8 +189,8 @@
/* <Input> */ /* <Input> */
/* stream :: A pointer to the stream object. */ /* stream :: A pointer to the stream object. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_close_stream( FT_Stream stream ) ft_close_stream( FT_Stream stream )
{ {
munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size ); munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );

View File

@ -295,19 +295,25 @@ FT_BEGIN_HEADER
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
/* that contains pointers to callback functions. */ /* that contains pointers to callback functions. */
/* */ /* */
#ifdef __cplusplus
#define FT_CALLBACK_DEF extern "C" #ifndef FT_CALLBACK_DEF
#define FT_CALLBACK_TABLE extern "C" # ifdef __cplusplus
#define FT_CALLBACK_TABLE_DEF extern "C" # define FT_CALLBACK_DEF(x) extern "C" x
# else
# define FT_CALLBACK_DEF(x) static x
# endif
#endif
#else #ifndef FT_CALLBACK_TABLE
# ifdef __cplusplus
# define FT_CALLBACK_TABLE extern "C"
# define FT_CALLBACK_TABLE_DEF extern "C"
# else
# define FT_CALLBACK_TABLE extern
# define FT_CALLBACK_TABLE_DEF
# endif
#endif
#define FT_CALLBACK_DEF static
#define FT_CALLBACK_TABLE extern
#define FT_CALLBACK_TABLE_DEF
#endif /* __cplusplus */
FT_END_HEADER FT_END_HEADER

View File

@ -32,35 +32,35 @@
} FT_AutoHinterRec; } FT_AutoHinterRec;
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ft_autohinter_init( FT_AutoHinter module ) ft_autohinter_init( FT_AutoHinter module )
{ {
return ah_hinter_new( module->root.library, &module->hinter ); return ah_hinter_new( module->root.library, &module->hinter );
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_autohinter_done( FT_AutoHinter module ) ft_autohinter_done( FT_AutoHinter module )
{ {
ah_hinter_done( module->hinter ); ah_hinter_done( module->hinter );
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ft_autohinter_load( FT_AutoHinter module, ft_autohinter_load( FT_AutoHinter module,
FT_GlyphSlot slot, FT_GlyphSlot slot,
FT_Size size, FT_Size size,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_ULong load_flags ) FT_ULong load_flags )
{ {
return ah_hinter_load_glyph( module->hinter, return ah_hinter_load_glyph( module->hinter,
slot, size, glyph_index, load_flags ); slot, size, glyph_index, load_flags );
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_autohinter_reset( FT_AutoHinter module, ft_autohinter_reset( FT_AutoHinter module,
FT_Face face ) FT_Face face )
{ {
UNUSED( module ); UNUSED( module );
@ -69,20 +69,20 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_autohinter_get_globals( FT_AutoHinter module, ft_autohinter_get_globals( FT_AutoHinter module,
FT_Face face, FT_Face face,
void** global_hints, void** global_hints,
long* global_len ) long* global_len )
{ {
ah_hinter_get_global_hints( module->hinter, face, ah_hinter_get_global_hints( module->hinter, face,
global_hints, global_len ); global_hints, global_len );
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_autohinter_done_globals( FT_AutoHinter module, ft_autohinter_done_globals( FT_AutoHinter module,
void* global_hints ) void* global_hints )
{ {
ah_hinter_done_global_hints( module->hinter, global_hints ); ah_hinter_done_global_hints( module->hinter, global_hints );
} }

View File

@ -68,9 +68,9 @@
/* <Return> */ /* <Return> */
/* The address of newly allocated block. */ /* The address of newly allocated block. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void*)
void* ft_alloc( FT_Memory memory, ft_alloc( FT_Memory memory,
long size ) long size )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
@ -98,11 +98,11 @@
/* <Return> */ /* <Return> */
/* The address of the reallocated memory block. */ /* The address of the reallocated memory block. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void*)
void* ft_realloc( FT_Memory memory, ft_realloc( FT_Memory memory,
long cur_size, long cur_size,
long new_size, long new_size,
void* block ) void* block )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
FT_UNUSED( cur_size ); FT_UNUSED( cur_size );
@ -124,9 +124,9 @@
/* */ /* */
/* block :: The address of block in memory to be freed. */ /* block :: The address of block in memory to be freed. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_free( FT_Memory memory, ft_free( FT_Memory memory,
void* block ) void* block )
{ {
FT_UNUSED( memory ); FT_UNUSED( memory );
@ -166,8 +166,8 @@
/* <Input> */ /* <Input> */
/* stream :: A pointer to the stream object. */ /* stream :: A pointer to the stream object. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ft_close_stream( FT_Stream stream ) ft_close_stream( FT_Stream stream )
{ {
fclose( STREAM_FILE( stream ) ); fclose( STREAM_FILE( stream ) );
@ -197,11 +197,11 @@
/* <Return> */ /* <Return> */
/* The number of bytes actually read. */ /* The number of bytes actually read. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(unsigned long)
unsigned long ft_io_stream( FT_Stream stream, ft_io_stream( FT_Stream stream,
unsigned long offset, unsigned long offset,
unsigned char* buffer, unsigned char* buffer,
unsigned long count ) unsigned long count )
{ {
FILE* file; FILE* file;

18
src/cache/ftcchunk.c vendored
View File

@ -288,9 +288,9 @@
( (FTC_ChunkSet)(node)->root.data ) ( (FTC_ChunkSet)(node)->root.data )
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_chunk_set_lru_init( FT_Lru lru, ftc_chunk_set_lru_init( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_Chunk_Cache cache = FTC_CSET_LRU_GET_CACHE( lru ); FTC_Chunk_Cache cache = FTC_CSET_LRU_GET_CACHE( lru );
FT_Error error; FT_Error error;
@ -311,9 +311,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ftc_chunk_set_lru_done( FT_Lru lru, ftc_chunk_set_lru_done( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_ChunkSet cset = FTC_LRUNODE_CSET( node ); FTC_ChunkSet cset = FTC_LRUNODE_CSET( node );
@ -324,9 +324,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Bool)
FT_Bool ftc_chunk_set_lru_compare( FT_LruNode node, ftc_chunk_set_lru_compare( FT_LruNode node,
FT_LruKey key ) FT_LruKey key )
{ {
FTC_ChunkSet cset = FTC_LRUNODE_CSET( node ); FTC_ChunkSet cset = FTC_LRUNODE_CSET( node );

18
src/cache/ftcglyph.c vendored
View File

@ -316,9 +316,9 @@
( (FTC_GlyphSet)(node)->root.data ) ( (FTC_GlyphSet)(node)->root.data )
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_glyph_set_lru_init( FT_Lru lru, ftc_glyph_set_lru_init( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_Glyph_Cache cache = FTC_GSET_LRU_GET_CACHE( lru ); FTC_Glyph_Cache cache = FTC_GSET_LRU_GET_CACHE( lru );
FT_Error error; FT_Error error;
@ -337,9 +337,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ftc_glyph_set_lru_done( FT_Lru lru, ftc_glyph_set_lru_done( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_GlyphSet gset = FTC_LRUNODE_GSET( node ); FTC_GlyphSet gset = FTC_LRUNODE_GSET( node );
@ -350,9 +350,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Bool)
FT_Bool ftc_glyph_set_lru_compare( FT_LruNode node, ftc_glyph_set_lru_compare( FT_LruNode node,
FT_LruKey key ) FT_LruKey key )
{ {
FTC_GlyphSet gset = FTC_LRUNODE_GSET( node ); FTC_GlyphSet gset = FTC_LRUNODE_GSET( node );

30
src/cache/ftcimage.c vendored
View File

@ -62,9 +62,9 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ftc_glyph_image_node_destroy( FTC_GlyphImage node, ftc_glyph_image_node_destroy( FTC_GlyphImage node,
FTC_GlyphSet gset ) FTC_GlyphSet gset )
{ {
FT_Memory memory = gset->memory; FT_Memory memory = gset->memory;
@ -74,10 +74,10 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_glyph_image_node_new( FTC_GlyphSet gset, ftc_glyph_image_node_new( FTC_GlyphSet gset,
FT_UInt glyph_index, FT_UInt glyph_index,
FTC_GlyphImage *anode ) FTC_GlyphImage *anode )
{ {
FT_Memory memory = gset->memory; FT_Memory memory = gset->memory;
FTC_ImageSet imageset = (FTC_ImageSet)gset; FTC_ImageSet imageset = (FTC_ImageSet)gset;
@ -161,8 +161,8 @@
/* this function is important because it is both part of */ /* this function is important because it is both part of */
/* an FTC_GlyphSet_Class and an FTC_CacheNode_Class */ /* an FTC_GlyphSet_Class and an FTC_CacheNode_Class */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_ULong)
FT_ULong ftc_glyph_image_node_size( FTC_GlyphImage node ) ftc_glyph_image_node_size( FTC_GlyphImage node )
{ {
FT_ULong size = 0; FT_ULong size = 0;
FT_Glyph glyph = node->ft_glyph; FT_Glyph glyph = node->ft_glyph;
@ -212,18 +212,18 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_image_set_init( FTC_ImageSet iset, ftc_image_set_init( FTC_ImageSet iset,
FTC_Image_Desc* type ) FTC_Image_Desc* type )
{ {
iset->description = *type; iset->description = *type;
return 0; return 0;
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Bool)
FT_Bool ftc_image_set_compare( FTC_ImageSet iset, ftc_image_set_compare( FTC_ImageSet iset,
FTC_Image_Desc* type ) FTC_Image_Desc* type )
{ {
return FT_BOOL( !memcmp( &iset->description, type, sizeof ( *type ) ) ); return FT_BOOL( !memcmp( &iset->description, type, sizeof ( *type ) ) );
} }

46
src/cache/ftcmanag.c vendored
View File

@ -41,9 +41,9 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_manager_init_face( FT_Lru lru, ftc_manager_init_face( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_Manager manager = FTC_LRU_GET_MANAGER( lru ); FTC_Manager manager = FTC_LRU_GET_MANAGER( lru );
FT_Error error; FT_Error error;
@ -67,10 +67,10 @@
/* helper function for ftc_manager_done_face() */ /* helper function for ftc_manager_done_face() */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Bool)
FT_Bool ftc_manager_size_selector( FT_Lru lru, ftc_manager_size_selector( FT_Lru lru,
FT_LruNode node, FT_LruNode node,
FT_Pointer data ) FT_Pointer data )
{ {
FT_UNUSED( lru ); FT_UNUSED( lru );
@ -78,9 +78,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ftc_manager_done_face( FT_Lru lru, ftc_manager_done_face( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_Manager manager = FTC_LRU_GET_MANAGER( lru ); FTC_Manager manager = FTC_LRU_GET_MANAGER( lru );
FT_Face face = (FT_Face)node->root.data; FT_Face face = (FT_Face)node->root.data;
@ -107,9 +107,9 @@
} FTC_FontRequest; } FTC_FontRequest;
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_manager_init_size( FT_Lru lru, ftc_manager_init_size( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FTC_FontRequest* font_req = (FTC_FontRequest*)node->key; FTC_FontRequest* font_req = (FTC_FontRequest*)node->key;
FT_Size size; FT_Size size;
@ -136,9 +136,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ftc_manager_done_size( FT_Lru lru, ftc_manager_done_size( FT_Lru lru,
FT_LruNode node ) FT_LruNode node )
{ {
FT_UNUSED( lru ); FT_UNUSED( lru );
@ -147,10 +147,10 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_manager_flush_size( FT_Lru lru, ftc_manager_flush_size( FT_Lru lru,
FT_LruNode node, FT_LruNode node,
FT_LruKey key ) FT_LruKey key )
{ {
FTC_FontRequest* req = (FTC_FontRequest*)key; FTC_FontRequest* req = (FTC_FontRequest*)key;
FT_Size size = (FT_Size)node->root.data; FT_Size size = (FT_Size)node->root.data;
@ -174,9 +174,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Bool)
FT_Bool ftc_manager_compare_size( FT_LruNode node, ftc_manager_compare_size( FT_LruNode node,
FT_LruKey key ) FT_LruKey key )
{ {
FTC_FontRequest* req = (FTC_FontRequest*)key; FTC_FontRequest* req = (FTC_FontRequest*)key;
FT_Size size = (FT_Size)node->root.data; FT_Size size = (FT_Size)node->root.data;

42
src/cache/ftcsbits.c vendored
View File

@ -56,8 +56,8 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void ftc_sbit_chunk_node_destroy( FTC_ChunkNode node ) ftc_sbit_chunk_node_destroy( FTC_ChunkNode node )
{ {
FTC_ChunkSet cset = node->cset; FTC_ChunkSet cset = node->cset;
FT_Memory memory = cset->memory; FT_Memory memory = cset->memory;
@ -73,10 +73,10 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_bitmap_copy( FT_Memory memory, ftc_bitmap_copy( FT_Memory memory,
FT_Bitmap* source, FT_Bitmap* source,
FTC_SBit target ) FTC_SBit target )
{ {
FT_Error error; FT_Error error;
FT_Int pitch = source->pitch; FT_Int pitch = source->pitch;
@ -95,10 +95,10 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_sbit_chunk_node_new( FTC_ChunkSet cset, ftc_sbit_chunk_node_new( FTC_ChunkSet cset,
FT_UInt index, FT_UInt index,
FTC_ChunkNode *anode ) FTC_ChunkNode *anode )
{ {
FT_Error error; FT_Error error;
FT_Memory memory = cset->memory; FT_Memory memory = cset->memory;
@ -240,8 +240,8 @@
/* this function is important because it is both part of */ /* this function is important because it is both part of */
/* an FTC_ChunkSet_Class and an FTC_CacheNode_Class */ /* an FTC_ChunkSet_Class and an FTC_CacheNode_Class */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_ULong)
FT_ULong ftc_sbit_chunk_node_size( FTC_ChunkNode node ) ftc_sbit_chunk_node_size( FTC_ChunkNode node )
{ {
FT_ULong size; FT_ULong size;
FTC_ChunkSet cset = node->cset; FTC_ChunkSet cset = node->cset;
@ -282,9 +282,9 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_sbit_chunk_set_sizes( FTC_ChunkSet cset, ftc_sbit_chunk_set_sizes( FTC_ChunkSet cset,
FTC_Image_Desc* desc ) FTC_Image_Desc* desc )
{ {
FT_Error error; FT_Error error;
FT_Face face; FT_Face face;
@ -303,9 +303,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error ftc_sbit_chunk_set_init( FTC_SBitSet sset, ftc_sbit_chunk_set_init( FTC_SBitSet sset,
FTC_Image_Desc* type ) FTC_Image_Desc* type )
{ {
sset->desc = *type; sset->desc = *type;
@ -313,9 +313,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Bool)
FT_Bool ftc_sbit_chunk_set_compare( FTC_SBitSet sset, ftc_sbit_chunk_set_compare( FTC_SBitSet sset,
FTC_Image_Desc* type ) FTC_Image_Desc* type )
{ {
return FT_BOOL( !memcmp( &sset->desc, type, sizeof ( *type ) ) ); return FT_BOOL( !memcmp( &sset->desc, type, sizeof ( *type ) ) );
} }

View File

@ -36,9 +36,9 @@
#define FT_COMPONENT trace_cidgload #define FT_COMPONENT trace_cidgload
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error cid_load_glyph( T1_Decoder* decoder, cid_load_glyph( T1_Decoder* decoder,
FT_UInt glyph_index ) FT_UInt glyph_index )
{ {
CID_Face face = (CID_Face)decoder->builder.face; CID_Face face = (CID_Face)decoder->builder.face;
CID_Info* cid = &face->cid; CID_Info* cid = &face->cid;

View File

@ -158,9 +158,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error parse_font_bbox( CID_Face face, parse_font_bbox( CID_Face face,
CID_Parser* parser ) CID_Parser* parser )
{ {
FT_Fixed temp[4]; FT_Fixed temp[4];
FT_BBox* bbox = &face->cid.font_bbox; FT_BBox* bbox = &face->cid.font_bbox;
@ -177,9 +177,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error parse_font_matrix( CID_Face face, parse_font_matrix( CID_Face face,
CID_Parser* parser ) CID_Parser* parser )
{ {
FT_Matrix* matrix; FT_Matrix* matrix;
FT_Vector* offset; FT_Vector* offset;
@ -231,9 +231,9 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error parse_fd_array( CID_Face face, parse_fd_array( CID_Face face,
CID_Parser* parser ) CID_Parser* parser )
{ {
CID_Info* cid = &face->cid; CID_Info* cid = &face->cid;
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;

View File

@ -129,9 +129,9 @@
/* qsort callback to sort the unicode map */ /* qsort callback to sort the unicode map */
FT_CALLBACK_DEF FT_CALLBACK_DEF(int)
int compare_uni_maps( const void* a, compare_uni_maps( const void* a,
const void* b ) const void* b )
{ {
PS_UniMap* map1 = (PS_UniMap*)a; PS_UniMap* map1 = (PS_UniMap*)a;
PS_UniMap* map2 = (PS_UniMap*)b; PS_UniMap* map2 = (PS_UniMap*)b;

View File

@ -114,9 +114,9 @@
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ #endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Module_Interface)
FT_Module_Interface SFNT_Get_Interface( FT_Module module, SFNT_Get_Interface( FT_Module module,
const char* interface ) const char* interface )
{ {
FT_UNUSED( module ); FT_UNUSED( module );

View File

@ -34,19 +34,17 @@
#define FT_COMPONENT trace_ttcmap #define FT_COMPONENT trace_ttcmap
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_UInt) code_to_index0( TT_CMapTable* charmap,
FT_UInt code_to_index0( TT_CMapTable* charmap, FT_ULong char_code );
FT_ULong char_code );
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_UInt) code_to_index2( TT_CMapTable* charmap,
FT_UInt code_to_index2( TT_CMapTable* charmap, FT_ULong char_code );
FT_ULong char_code );
FT_CALLBACK_DEF
FT_UInt code_to_index4( TT_CMapTable* charmap,
FT_ULong char_code );
FT_CALLBACK_DEF
FT_UInt code_to_index6( TT_CMapTable* charmap,
FT_ULong char_code );
FT_CALLBACK_DEF(FT_UInt) code_to_index4( TT_CMapTable* charmap,
FT_ULong char_code );
FT_CALLBACK_DEF(FT_UInt) code_to_index6( TT_CMapTable* charmap,
FT_ULong char_code );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -351,9 +349,9 @@
/* <Return> */ /* <Return> */
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ /* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_UInt)
FT_UInt code_to_index0( TT_CMapTable* cmap, code_to_index0( TT_CMapTable* cmap,
FT_ULong charCode ) FT_ULong charCode )
{ {
TT_CMap0* cmap0 = &cmap->c.cmap0; TT_CMap0* cmap0 = &cmap->c.cmap0;
@ -377,9 +375,9 @@
/* <Return> */ /* <Return> */
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ /* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_UInt)
FT_UInt code_to_index2( TT_CMapTable* cmap, code_to_index2( TT_CMapTable* cmap,
FT_ULong charCode ) FT_ULong charCode )
{ {
FT_UInt result, index1, offset; FT_UInt result, index1, offset;
FT_UInt char_lo; FT_UInt char_lo;
@ -441,9 +439,9 @@
/* <Return> */ /* <Return> */
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ /* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_UInt)
FT_UInt code_to_index4( TT_CMapTable* cmap, code_to_index4( TT_CMapTable* cmap,
FT_ULong charCode ) FT_ULong charCode )
{ {
FT_UInt result, index1, segCount; FT_UInt result, index1, segCount;
TT_CMap4* cmap4; TT_CMap4* cmap4;
@ -524,9 +522,9 @@
/* <Return> */ /* <Return> */
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ /* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */ /* */
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_UInt)
FT_UInt code_to_index6( TT_CMapTable* cmap, code_to_index6( TT_CMapTable* cmap,
FT_ULong charCode ) FT_ULong charCode )
{ {
TT_CMap6* cmap6; TT_CMap6* cmap6;
FT_UInt result = 0; FT_UInt result = 0;

View File

@ -201,11 +201,11 @@
/* */ /* */
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error TT_Access_Glyph_Frame( TT_Loader* loader, TT_Access_Glyph_Frame( TT_Loader* loader,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_ULong offset, FT_ULong offset,
FT_UInt byte_count ) FT_UInt byte_count )
{ {
FT_Error error; FT_Error error;
FT_Stream stream = loader->stream; FT_Stream stream = loader->stream;
@ -224,8 +224,8 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void)
void TT_Forget_Glyph_Frame( TT_Loader* loader ) TT_Forget_Glyph_Frame( TT_Loader* loader )
{ {
FT_Stream stream = loader->stream; FT_Stream stream = loader->stream;
@ -234,8 +234,8 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error TT_Load_Glyph_Header( TT_Loader* loader ) TT_Load_Glyph_Header( TT_Loader* loader )
{ {
FT_Stream stream = loader->stream; FT_Stream stream = loader->stream;
@ -257,8 +257,8 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error TT_Load_Simple_Glyph( TT_Loader* load ) TT_Load_Simple_Glyph( TT_Loader* load )
{ {
FT_Error error; FT_Error error;
FT_Stream stream = load->stream; FT_Stream stream = load->stream;
@ -416,8 +416,8 @@
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error TT_Load_Composite_Glyph( TT_Loader* loader ) TT_Load_Composite_Glyph( TT_Loader* loader )
{ {
FT_Error error; FT_Error error;
FT_Stream stream = loader->stream; FT_Stream stream = loader->stream;

View File

@ -1249,47 +1249,41 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_F26Dot6) Read_CVT( EXEC_OP_ FT_ULong index )
FT_F26Dot6 Read_CVT( EXEC_OP_ FT_ULong index )
{ {
return CUR.cvt[index]; return CUR.cvt[index];
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_F26Dot6) Read_CVT_Stretched( EXEC_OP_ FT_ULong index )
FT_F26Dot6 Read_CVT_Stretched( EXEC_OP_ FT_ULong index )
{ {
return TT_MULFIX( CUR.cvt[index], CURRENT_Ratio() ); return TT_MULFIX( CUR.cvt[index], CURRENT_Ratio() );
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(voidà Write_CVT( EXEC_OP_ FT_ULong index,
void Write_CVT( EXEC_OP_ FT_ULong index, FT_F26Dot6 value )
FT_F26Dot6 value )
{ {
CUR.cvt[index] = value; CUR.cvt[index] = value;
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void) Write_CVT_Stretched( EXEC_OP_ FT_ULong index,
void Write_CVT_Stretched( EXEC_OP_ FT_ULong index, FT_F26Dot6 value )
FT_F26Dot6 value )
{ {
CUR.cvt[index] = FT_DivFix( value, CURRENT_Ratio() ); CUR.cvt[index] = FT_DivFix( value, CURRENT_Ratio() );
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void) Move_CVT( EXEC_OP_ FT_ULong index,
void Move_CVT( EXEC_OP_ FT_ULong index, FT_F26Dot6 value )
FT_F26Dot6 value )
{ {
CUR.cvt[index] += value; CUR.cvt[index] += value;
} }
FT_CALLBACK_DEF FT_CALLBACK_DEF(void) Move_CVT_Stretched( EXEC_OP_ FT_ULong index,
void Move_CVT_Stretched( EXEC_OP_ FT_ULong index, FT_F26Dot6 value )
FT_F26Dot6 value )
{ {
CUR.cvt[index] += FT_DivFix( value, CURRENT_Ratio() ); CUR.cvt[index] += FT_DivFix( value, CURRENT_Ratio() );
} }

View File

@ -139,9 +139,9 @@
/* compare two kerning pairs */ /* compare two kerning pairs */
FT_CALLBACK_DEF FT_CALLBACK_DEF(int)
int compare_kern_pairs( const void* a, compare_kern_pairs( const void* a,
const void* b ) const void* b )
{ {
T1_Kern_Pair* pair1 = (T1_Kern_Pair*)a; T1_Kern_Pair* pair1 = (T1_Kern_Pair*)a;
T1_Kern_Pair* pair2 = (T1_Kern_Pair*)b; T1_Kern_Pair* pair2 = (T1_Kern_Pair*)b;

View File

@ -55,9 +55,9 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF FT_CALLBACK_DEF(FT_Error)
FT_Error T1_Parse_Glyph( T1_Decoder* decoder, T1_Parse_Glyph( T1_Decoder* decoder,
FT_UInt glyph_index ) FT_UInt glyph_index )
{ {
T1_Face face = (T1_Face)decoder->builder.face; T1_Face face = (T1_Face)decoder->builder.face;
T1_Font* type1 = &face->type1; T1_Font* type1 = &face->type1;