Commit 18914a4f500bc45a1169aff66006e494d25ac59b

David Turner 2002-05-21T20:57:36

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

diff --git a/ChangeLog b/ChangeLog
index 26932aa..8908dae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2002-05-21  David Turner  <david@freetype.org>
 
+        * 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:
           
diff --git a/README b/README
index 4aafe1d..3407ffc 100644
--- 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
diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c
index c4d4315..5e64792 100644
--- 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++;
       }