From 87a475c09f6b9b391bca37de47a303a62a397b83 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 19 Sep 2001 21:20:36 +0000 Subject: [PATCH] header to abstract the difference between FreeType 2.0.3 and 2.0.4 error 2001-09-19 Havoc Pennington * pango/opentype/fterrcompat.h: header to abstract the difference between FreeType 2.0.3 and 2.0.4 error codes, based on the configure check. * configure.in: check for the tterrors.h header in FreeType 2.0.3, and define HAVE_FREETYPE_2_0_3 if we have it --- src/Makefile.am | 1 + src/fterrcompat.h | 16 ++++++++++++++++ src/ftxgdef.c | 3 ++- src/ftxgpos.c | 3 ++- src/ftxgsub.c | 3 ++- src/ftxopen.c | 3 ++- src/pango-ot-info.c | 2 +- 7 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 src/fterrcompat.h diff --git a/src/Makefile.am b/src/Makefile.am index 9f9c9dd..2081396 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ LDADDS = @STRIP_BEGIN@ \ noinst_LTLIBRARIES = libpango-ot.la libpango_ot_la_SOURCES = \ + fterrcompat.h \ ftxopen.c \ ftxopen.h \ ftxopenf.h \ diff --git a/src/fterrcompat.h b/src/fterrcompat.h new file mode 100644 index 0000000..70b45e2 --- /dev/null +++ b/src/fterrcompat.h @@ -0,0 +1,16 @@ + +#ifndef FTERRCOMPAT_H +#define FTERRCOMPAT_H + +#include + +#ifdef HAVE_FREETYPE_2_0_3 +#include +#else +#define TT_Err_Ok FT_Err_Ok +#define TT_Err_Invalid_Argument FT_Err_Invalid_Argument +#define TT_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle +#define TT_Err_Table_Missing FT_Err_Table_Missing +#endif + +#endif diff --git a/src/ftxgdef.c b/src/ftxgdef.c index ee177e8..54b1dd0 100644 --- a/src/ftxgdef.c +++ b/src/ftxgdef.c @@ -19,9 +19,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/ftxgpos.c b/src/ftxgpos.c index 07d73d9..7515b53 100644 --- a/src/ftxgpos.c +++ b/src/ftxgpos.c @@ -27,9 +27,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/ftxgsub.c b/src/ftxgsub.c index 43adb2c..b1f516c 100644 --- a/src/ftxgsub.c +++ b/src/ftxgsub.c @@ -27,9 +27,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/ftxopen.c b/src/ftxopen.c index 07a5029..7815aba 100644 --- a/src/ftxopen.c +++ b/src/ftxopen.c @@ -17,9 +17,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/pango-ot-info.c b/src/pango-ot-info.c index b426e32..5a657c4 100644 --- a/src/pango-ot-info.c +++ b/src/pango-ot-info.c @@ -20,7 +20,7 @@ */ #include "pango-ot-private.h" -#include +#include "fterrcompat.h" #include #include -- 2.7.4