header to abstract the difference between FreeType 2.0.3 and 2.0.4 error
authorHavoc Pennington <hp@redhat.com>
Wed, 19 Sep 2001 21:20:36 +0000 (21:20 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Wed, 19 Sep 2001 21:20:36 +0000 (21:20 +0000)
2001-09-19  Havoc Pennington  <hp@redhat.com>

* 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
src/fterrcompat.h [new file with mode: 0644]
src/ftxgdef.c
src/ftxgpos.c
src/ftxgsub.c
src/ftxopen.c
src/pango-ot-info.c

index 9f9c9dd..2081396 100644 (file)
@@ -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 (file)
index 0000000..70b45e2
--- /dev/null
@@ -0,0 +1,16 @@
+
+#ifndef FTERRCOMPAT_H
+#define FTERRCOMPAT_H
+
+#include <config.h>
+
+#ifdef HAVE_FREETYPE_2_0_3
+#include <freetype/internal/tterrors.h>
+#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
index ee177e8..54b1dd0 100644 (file)
 
 #include <freetype/internal/ftstream.h>
 #include <freetype/internal/ftmemory.h>
-#include <freetype/internal/tterrors.h>
 #include <freetype/internal/tttypes.h>
 
+#include "fterrcompat.h"
+
 #include "ftxopen.h"
 #include "ftxopenf.h"
 
index 07d73d9..7515b53 100644 (file)
 
 #include <freetype/internal/ftstream.h>
 #include <freetype/internal/ftmemory.h>
-#include <freetype/internal/tterrors.h>
 #include <freetype/internal/tttypes.h>
 
+#include "fterrcompat.h"
+
 #include "ftxopen.h"
 #include "ftxopenf.h"
 
index 43adb2c..b1f516c 100644 (file)
 
 #include <freetype/internal/ftstream.h>
 #include <freetype/internal/ftmemory.h>
-#include <freetype/internal/tterrors.h>
 #include <freetype/internal/tttypes.h>
 
+#include "fterrcompat.h"
+
 #include "ftxopen.h"
 #include "ftxopenf.h"
 
index 07a5029..7815aba 100644 (file)
 
 #include <freetype/internal/ftstream.h>
 #include <freetype/internal/ftmemory.h>
-#include <freetype/internal/tterrors.h>
 #include <freetype/internal/tttypes.h>
 
+#include "fterrcompat.h"
+
 #include "ftxopen.h"
 #include "ftxopenf.h"
 
index b426e32..5a657c4 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "pango-ot-private.h"
-#include <freetype/internal/tterrors.h>
+#include "fterrcompat.h"
 #include <freetype/internal/ftobjs.h>
 #include <freetype/ftmodule.h>