shithub: freetype+ttf2subf

Download patch

ref: 18914a4f500bc45a1169aff66006e494d25ac59b
parent: 9e883cf6689a723ccfb996c97e92be358eccb11c
author: David Turner <[email protected]>
date: Tue May 21 16:57:36 EDT 2002

* src/type42/t32drivr.c: removing compiler warnings

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2002-05-21  David Turner  <[email protected]>
 
+        * src/type42/t32drivr.c: removing compiler warnings
+
         * include/freetype/internal/ftbdf.h, src/base/ftbdf.c,
           src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk:
           
--- a/README
+++ b/README
@@ -10,7 +10,7 @@
   is called `libttf'.  They are *not* compatible!
 
 
-  FreeType 2.1.0
+  FreeType 2.1.1
   ==============
 
   Please   read  the  docs/CHANGES   file,  it   contains  IMPORTANT
@@ -22,9 +22,9 @@
   Note  that the  FreeType 2  documentation  is now  available as  a
   separate package from our sites.  See:
 
-    ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.0.tar.bz2
-    ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.0.tar.gz
-    ftp://ftp.freetype.org/pub/freetype2/ftdoc210.zip
+    ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.1.tar.bz2
+    ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.1.tar.gz
+    ftp://ftp.freetype.org/pub/freetype2/ftdoc211.zip
 
 
   Reports
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -579,17 +579,33 @@
   }
 
 
-  static FT_Byte
+  static FT_UInt
   hexval( FT_Byte  v )
   {
-    if ( v >= 'A' && v <= 'F' )
-      return v - 'A' + 10;
-    if ( v >= 'a' && v <= 'f' )
-      return v - 'a' + 10;
-    if ( v >= '0' && v <= '9' )
-      return v - '0';
-
-    return 0;
+    FT_UInt  d;
+    
+    d = (FT_UInt)( v - 'A' );
+    if ( d < 6 )
+    {
+      d += 10;
+      goto Exit;
+    }
+      
+    d = (FT_UInt)( v - 'A' );
+    if ( d < 6 )
+    {
+      d += 10;
+      goto Exit;
+    }
+      
+    d = (FT_UInt)( v - '0' );
+    if ( d < 10 )
+      goto Exit;
+      
+    d = 0;
+ 
+  Exit:         
+    return d;
   }
 
 
@@ -681,7 +697,7 @@
           goto Fail;
         }
 
-        v = 16 * hexval( *cur++ ) + hexval( *cur++ );
+        v = (FT_Byte)( 16 * hexval( *cur++ ) + hexval( *cur++ ) );
         string_size++;
       }