shithub: freetype+ttf2subf

Download patch

ref: c11aeb647c6a54cadb705339791111e69250e5e9
parent: 56ef6bc4d67230aac635298006fd7a9f1096c744
author: Werner Lemberg <[email protected]>
date: Thu Mar 10 10:49:45 EST 2005

* src/truetype/ttpload.c (tt_face_load_cvt, tt_face_load_fpgm):
Fix serious typo which prevented correct TT rendering.

* include/freetype/internal/ftmemory.h: Undo change from 2005-03-03.
To suppress warnings it is sufficient to use `-fno-strict-aliasing'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2005-03-10  Werner Lemberg  <[email protected]>
 
+	* src/truetype/ttpload.c (tt_face_load_cvt, tt_face_load_fpgm):
+	Fix serious typo which prevented correct TT rendering.
+
+	* include/freetype/internal/ftmemory.h: Undo change from 2005-03-03.
+	To suppress warnings it is sufficient to use `-fno-strict-aliasing'.
+
+2005-03-10  Werner Lemberg  <[email protected]>
+
 	* src/tools/glnames.py: Formatted.
 	Format output to be in sync with other FreeType code.
 	Import `re' and `os.path'.
@@ -5986,7 +5994,7 @@
 	the use of system-wide zlib.
 
 	Note that this macro, as well as
-	FT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore.
+	TT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore.
 	This allows the build system to define them depending on the
 	configuration (typically by adding -D flags at compile time).
 
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -368,59 +368,6 @@
   /* if an error occured (i.e. if 'error != 0').                           */
   /*                                                                       */
 
-
-  /*
-   *  gcc 3.3 and newer will generate tons of _stupid_ warnings if we
-   *  don't take special measures.
-   */
-#if defined ( __GNUC__ )                                       && \
-    ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 3 ) )
-
-
-#define FT_ALLOC( _pointer_, _size_ )                  \
-          ({                                           \
-            void*  _tmp_ = NULL;                       \
-                                                       \
-                                                       \
-            error     = FT_MEM_ALLOC( _tmp_, _size_ ); \
-            _pointer_ = _tmp_;                         \
-            error != 0;                                \
-          })
-
-#define FT_REALLOC( _pointer_, _cursize_, _newsize_ )                  \
-          ({                                                           \
-            void*  _tmp_ = _pointer_;                                  \
-                                                                       \
-                                                                       \
-            error     = FT_MEM_REALLOC( _tmp_, _cursize_, _newsize_ ); \
-            _pointer_ = _tmp_;                                         \
-            error != 0;                                                \
-          })
-
-#define FT_QALLOC( _pointer_, _size_ )                  \
-          ({                                            \
-            void*  _tmp_;                               \
-                                                        \
-                                                        \
-            error     = FT_MEM_QALLOC( _tmp_, _size_ ); \
-            _pointer_ = _tmp_;                          \
-            error != 0;                                 \
-          })
-
-#define FT_QREALLOC( _pointer_, _cursize_, _newsize_ )                  \
-          ({                                                            \
-            void*  _tmp_ = _pointer_;                                   \
-                                                                        \
-                                                                        \
-            error     = FT_MEM_QREALLOC( _tmp_, _cursize_, _newsize_ ); \
-            _pointer_ = _tmp_;                                          \
-            error != 0;                                                 \
-          })
-
-
-#else /* !GCC || GCC < 3.3 */
-
-
 #define FT_ALLOC( _pointer_, _size_ )                       \
           FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )
 
@@ -432,8 +379,6 @@
 
 #define FT_QREALLOC( _pointer_, _current_, _size_ )                       \
           FT_SET_ERROR( FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) )
-
-#endif /* !GCC || GCC < 3.3 */
 
 
 #define FT_FREE( _pointer_ )       \
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -301,7 +301,7 @@
   tt_face_load_cvt( TT_Face    face,
                     FT_Stream  stream )
   {
-#ifdef FT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
     FT_Error   error;
     FT_Memory  memory = stream->memory;
@@ -350,12 +350,12 @@
   Exit:
     return error;
 
-#else /* !FT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#else /* !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
 
     FT_UNUSED( face   );
     FT_UNUSED( stream );
 
-    return 0;
+    return TT_Err_Ok;
 
 #endif
   }
@@ -382,7 +382,7 @@
   tt_face_load_fpgm( TT_Face    face,
                      FT_Stream  stream )
   {
-#ifdef FT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
     FT_Error   error;
     FT_ULong   table_len;
@@ -431,12 +431,12 @@
   Exit:
     return error;
 
-#else /* !FT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#else /* !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
 
     FT_UNUSED( face   );
     FT_UNUSED( stream );
 
-    return 0;
+    return TT_Err_Ok;
 
 #endif
   }