From 2eaf0cf8fd6e7c290497fedb08134a89e7b49b1d Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 19 Mar 2015 17:34:42 +0400 Subject: Update bundled FreeType to 2.5.5 Removed everything, imported with help of import_from_tarball.sh script, and then added a pre-generated builds/unix/ftconfig.h Task-number: QTBUG-44648 Change-Id: Iea948e41f7761f1580382b3763d04c7a61383382 Reviewed-by: Lars Knoll --- src/3rdparty/freetype/src/pshinter/pshpic.c | 45 +++++++++++++++++------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'src/3rdparty/freetype/src/pshinter/pshpic.c') diff --git a/src/3rdparty/freetype/src/pshinter/pshpic.c b/src/3rdparty/freetype/src/pshinter/pshpic.c index 51a0879888..568f4ac4b0 100644 --- a/src/3rdparty/freetype/src/pshinter/pshpic.c +++ b/src/3rdparty/freetype/src/pshinter/pshpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for pshinter module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,17 +20,23 @@ #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 ); @@ -38,30 +44,33 @@ } } + FT_Error - pshinter_module_class_pic_init( FT_Library library ) + pshinter_module_class_pic_init( FT_Library library ) { - FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = FT_Err_Ok; - PSHinterPIC* container; - FT_Memory memory = library->memory; + FT_PIC_Container* pic_container = &library->pic_container; + FT_Error error = FT_Err_Ok; + PSHinterPIC* container = NULL; + FT_Memory memory = library->memory; + /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; - FT_MEM_SET( container, 0, sizeof(*container) ); + 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 ); + + if ( error ) + pshinter_module_class_pic_free( library ); -/*Exit:*/ - if(error) - pshinter_module_class_pic_free(library); return error; } - #endif /* FT_CONFIG_OPTION_PIC */ + /* END */ -- cgit v1.2.3