Commit 9df3c223f70bdc2803e97991f5cad8aa23e45c78

Werner Lemberg 2007-05-20T18:07:52

* src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'. (ps_dimension_set_mask_bits): Remove `const'.

diff --git a/ChangeLog b/ChangeLog
index 15a025c..19c96dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-20  Ismail Dönmez  <ismail@pardus.org.tr>
+
+	* src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'.
+	(ps_dimension_set_mask_bits): Remove `const'.
+
 2007-06-19  Werner Lemberg  <wl@gnu.org>
 
 	* src/sfnt/ttmtx.c (tt_face_get_metrics)
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index b6ada75..2a885ef 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -308,11 +308,11 @@
 
   /* set a new mask to a given bit range */
   static FT_Error
-  ps_mask_table_set_bits( PS_Mask_Table  table,
-                          FT_Byte*       source,
-                          FT_UInt        bit_pos,
-                          FT_UInt        bit_count,
-                          FT_Memory      memory )
+  ps_mask_table_set_bits( PS_Mask_Table   table,
+                          const FT_Byte*  source,
+                          FT_UInt         bit_pos,
+                          FT_UInt         bit_count,
+                          FT_Memory       memory )
   {
     FT_Error  error = 0;
     PS_Mask   mask;
@@ -330,7 +330,7 @@
 
     /* now, copy bits */
     {
-      FT_Byte*  read  = source + ( bit_pos >> 3 );
+      FT_Byte*  read  = (FT_Byte*)source + ( bit_pos >> 3 );
       FT_Int    rmask = 0x80 >> ( bit_pos & 7 );
       FT_Byte*  write = mask->bytes;
       FT_Int    wmask = 0x80;
@@ -628,7 +628,7 @@
       goto Exit;
 
     /* set bits in new mask */
-    error = ps_mask_table_set_bits( &dim->masks, (FT_Byte*)source,
+    error = ps_mask_table_set_bits( &dim->masks, source,
                                     source_pos, source_bits, memory );
 
   Exit: