shithub: freetype+ttf2subf

Download patch

ref: 756655bdf8067b85d7bb361136751e5cf928c1be
parent: 499053c1c545118585bc9d4d61375c61b7bf97d4
author: Werner Lemberg <[email protected]>
date: Sat Jun 7 01:13:22 EDT 2003

* src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to
make it compile.

* include/freetype/internal/psaux.h, src/truetype/ttgload.h:
s/index/idx/ to fix compiler warnings.

* src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to
fix compiler warning.

* src/gzip/ftgzip.c (BUILDFIXED): Removed.
* src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use
FT_UNUSED to remove compiler warning.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2003-06-07  Werner Lemberg  <[email protected]>
+
+	* src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to
+	make it compile.
+
+2002-06-07  Detlef W�rkner  <[email protected]>
+
+	* include/freetype/internal/psaux.h, src/truetype/ttgload.h:
+	s/index/idx/ to fix compiler warnings.
+
+	* src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to
+	fix compiler warning.
+
+	* src/gzip/ftgzip.c (BUILDFIXED): Removed.
+	* src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use
+	FT_UNUSED to remove compiler warning.
+
 2003-06-06  Werner Lemberg  <[email protected]>
 
 	* include/freetype/ftstroker.h: Renamed to...
@@ -193,7 +210,7 @@
 	* src/pshinter/pshglob.c, src/pshinter/pshglob.h
 	(psh_globals_set_scale): Make it a local function.
 
-	* test/gview.c: Fix remaming ps3->ps typo.
+	* test/gview.c: Fix renaming ps3->ps typo.
 	Formatting.
 
 2003-05-29  Werner Lemberg  <[email protected]>
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -71,7 +71,7 @@
 
     FT_Error
     (*add)( PS_Table    table,
-            FT_Int      index,
+            FT_Int      idx,
             void*       object,
             FT_PtrDist  length );
 
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -607,10 +607,10 @@
     HUnlock( sfnt );
     ReleaseResource( sfnt );
 
-    is_cff = rlen > 4 && sfnt_data[0] == 'O' &&
-                         sfnt_data[1] == 'T' &&
-                         sfnt_data[2] == 'T' &&
-                         sfnt_data[3] == 'O';
+    is_cff = sfnt_size > 4 && sfnt_data[0] == 'O' &&
+                              sfnt_data[1] == 'T' &&
+                              sfnt_data[2] == 'T' &&
+                              sfnt_data[3] == 'O';
 
     return open_face_from_buffer( library,
                                   sfnt_data,
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -42,7 +42,6 @@
  /* original ZLib.                                                   */
 
 #define NO_DUMMY_DECL
-#define BUILDFIXED    /* save code size */
 #define MY_ZCALLOC
 
 #include "zlib.h"
--- a/src/gzip/inftrees.c
+++ b/src/gzip/inftrees.c
@@ -451,6 +451,8 @@
     ZFREE(z, c);
     fixed_built = 1;
   }
+#else
+  FT_UNUSED(z);
 #endif
   *bl = fixed_bl;
   *bd = fixed_bd;
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1835,7 +1835,7 @@
       if ( offset && table + offset + 2 < limit )
       {
         FT_Byte*                       cmap   = table + offset;
-        FT_UInt                        format = TT_PEEK_USHORT( cmap );
+        volatile FT_UInt               format = TT_PEEK_USHORT( cmap );
         const TT_CMap_Class* volatile  pclazz = tt_cmap_classes;
         TT_CMap_Class                  clazz;
 
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Glyph Loader (specification).                               */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -33,7 +33,7 @@
 
   FT_LOCAL( void )
   TT_Get_Metrics( TT_HoriHeader*  header,
-                  FT_UInt         index,
+                  FT_UInt         idx,
                   FT_Short*       bearing,
                   FT_UShort*      advance );