Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenpshpic.c
Go to the documentation of this file.
00001 /***************************************************************************/ 00002 /* */ 00003 /* pshpic.c */ 00004 /* */ 00005 /* The FreeType position independent code services for pshinter module. */ 00006 /* */ 00007 /* Copyright 2009, 2010 by */ 00008 /* Oran Agra and Mickey Gabel. */ 00009 /* */ 00010 /* This file is part of the FreeType project, and may only be used, */ 00011 /* modified, and distributed under the terms of the FreeType project */ 00012 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 00013 /* this file you indicate that you have read the license and */ 00014 /* understand and accept it fully. */ 00015 /* */ 00016 /***************************************************************************/ 00017 00018 00019 #include <ft2build.h> 00020 #include FT_FREETYPE_H 00021 #include FT_INTERNAL_OBJECTS_H 00022 #include "pshpic.h" 00023 00024 #ifdef FT_CONFIG_OPTION_PIC 00025 00026 /* forward declaration of PIC init functions from pshmod.c */ 00027 void FT_Init_Class_pshinter_interface( FT_Library, PSHinter_Interface*); 00028 00029 void 00030 pshinter_module_class_pic_free( FT_Library library ) 00031 { 00032 FT_PIC_Container* pic_container = &library->pic_container; 00033 FT_Memory memory = library->memory; 00034 if ( pic_container->pshinter ) 00035 { 00036 FT_FREE( pic_container->pshinter ); 00037 pic_container->pshinter = NULL; 00038 } 00039 } 00040 00041 00042 FT_Error 00043 pshinter_module_class_pic_init( FT_Library library ) 00044 { 00045 FT_PIC_Container* pic_container = &library->pic_container; 00046 FT_Error error = PSH_Err_Ok; 00047 PSHinterPIC* container; 00048 FT_Memory memory = library->memory; 00049 00050 00051 /* allocate pointer, clear and set global container pointer */ 00052 if ( FT_ALLOC ( container, sizeof ( *container ) ) ) 00053 return error; 00054 FT_MEM_SET( container, 0, sizeof ( *container ) ); 00055 pic_container->pshinter = container; 00056 00057 /* add call to initialization function when you add new scripts */ 00058 FT_Init_Class_pshinter_interface(library, &container->pshinter_interface); 00059 00060 /*Exit:*/ 00061 if(error) 00062 pshinter_module_class_pic_free(library); 00063 return error; 00064 } 00065 00066 00067 #endif /* FT_CONFIG_OPTION_PIC */ 00068 00069 /* END */ Generated on Sat May 26 2012 04:32:54 for ReactOS by
1.7.6.1
|