From 41bd254198b8b879a562a85f7dc868c3c0f7fbc1 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 12 Mar 2012 10:33:22 +0100 Subject: Updated to freetype-2.4.9 --- freetype/src/pshinter/pshnterr.h | 3 ++- freetype/src/pshinter/pshpic.c | 22 ++++++++++++++-------- freetype/src/pshinter/pshpic.h | 8 +++++++- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'freetype/src/pshinter') diff --git a/freetype/src/pshinter/pshnterr.h b/freetype/src/pshinter/pshnterr.h index 3c0029fbf..7cc180f0c 100644 --- a/freetype/src/pshinter/pshnterr.h +++ b/freetype/src/pshinter/pshnterr.h @@ -4,7 +4,7 @@ /* */ /* PS Hinter error codes (specification only). */ /* */ -/* Copyright 2003 by */ +/* Copyright 2003, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,6 +29,7 @@ #undef __FTERRORS_H__ +#undef FT_ERR_PREFIX #define FT_ERR_PREFIX PSH_Err_ #define FT_ERR_BASE FT_Mod_Err_PShinter diff --git a/freetype/src/pshinter/pshpic.c b/freetype/src/pshinter/pshpic.c index 5efb42294..1e0f9a9dc 100644 --- a/freetype/src/pshinter/pshpic.c +++ b/freetype/src/pshinter/pshpic.c @@ -20,17 +20,22 @@ #include FT_FREETYPE_H #include FT_INTERNAL_OBJECTS_H #include "pshpic.h" +#include "pshnterr.h" #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from pshmod.c */ - void FT_Init_Class_pshinter_interface( FT_Library, PSHinter_Interface*); + void + FT_Init_Class_pshinter_interface( FT_Library library, + PSHinter_Interface* clazz ); void - pshinter_module_class_pic_free( FT_Library library ) + pshinter_module_class_pic_free( FT_Library library ) { - FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_PIC_Container* pic_container = &library->pic_container; + FT_Memory memory = library->memory; + + if ( pic_container->pshinter ) { FT_FREE( pic_container->pshinter ); @@ -53,13 +58,14 @@ return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->pshinter = container; - + /* add call to initialization function when you add new scripts */ - FT_Init_Class_pshinter_interface(library, &container->pshinter_interface); + FT_Init_Class_pshinter_interface( + library, &container->pshinter_interface ); /*Exit:*/ - if(error) - pshinter_module_class_pic_free(library); + if( error ) + pshinter_module_class_pic_free( library ); return error; } diff --git a/freetype/src/pshinter/pshpic.h b/freetype/src/pshinter/pshpic.h index 3555d8e85..c10bdd999 100644 --- a/freetype/src/pshinter/pshpic.h +++ b/freetype/src/pshinter/pshpic.h @@ -19,7 +19,7 @@ #ifndef __PSHPIC_H__ #define __PSHPIC_H__ - + FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H @@ -40,6 +40,12 @@ FT_BEGIN_HEADER #define GET_PIC(lib) ((PSHinterPIC*)((lib)->pic_container.autofit)) #define FTPSHINTER_INTERFACE_GET (GET_PIC(library)->pshinter_interface) + /* see pshpic.c for the implementation */ + void + pshinter_module_class_pic_free( FT_Library library ); + + FT_Error + pshinter_module_class_pic_init( FT_Library library ); #endif /* FT_CONFIG_OPTION_PIC */ -- cgit v1.2.3