aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/pshinter
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/pshinter')
-rw-r--r--freetype/src/pshinter/pshnterr.h3
-rw-r--r--freetype/src/pshinter/pshpic.c22
-rw-r--r--freetype/src/pshinter/pshpic.h8
3 files changed, 23 insertions, 10 deletions
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 dc2f1d4e4..0eaf7335f 100644
--- a/freetype/src/pshinter/pshpic.c
+++ b/freetype/src/pshinter/pshpic.c
@@ -20,17 +20,22 @@
#include FT_FREETYPE_H
#include <freetype/internal/ftobjs.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 9e8ddc7d6..e54899acd 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 <freetype/internal/ftpic.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 */