ref: 2b32a177f3650d1019f84f9df98b180333e99505
parent: 07dcc10170911c6f05fcb237c61eeb869cde4399
author: Werner Lemberg <[email protected]>
date: Sat Apr 24 02:06:39 EDT 2004
* src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c (ps_parser_load_field): Use FT_CHAR_BIT.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-21 Werner Lemberg <[email protected]>
+
+ * src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c
+ (ps_parser_load_field): Use FT_CHAR_BIT.
+
2004-04-21 David Turner <[email protected]>
* src/cff/cffobjs.c (cff_face_init): Fix a small memory leak.
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -590,19 +590,19 @@
Store_Number:
switch ( field->size )
{
- case 1:
+ case (8 / FT_CHAR_BIT):
*(FT_Byte*)q = (FT_Byte)val;
break;
- case 2:
+ case (16 / FT_CHAR_BIT):
*(FT_Short*)q = (FT_Short)val;
break;
- case 4:
+ case (32 / FT_CHAR_BIT):
*(FT_Int32*)q = (FT_Int)val;
break;
- default: /* for 64-bit systems where long is 8 bytes */
+ default: /* for 64-bit systems */
*(FT_Long*)q = val;
}
break;
@@ -627,15 +627,15 @@
val += cff_parse_num( data++ );
switch ( field->size )
{
- case 1:
+ case (8 / FT_CHAR_BIT):
*(FT_Byte*)q = (FT_Byte)val;
break;
- case 2:
+ case (16 / FT_CHAR_BIT):
*(FT_Short*)q = (FT_Short)val;
break;
- case 4:
+ case (32 / FT_CHAR_BIT):
*(FT_Int32*)q = (FT_Int)val;
break;
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1255,15 +1255,15 @@
Store_Integer:
switch ( field->size )
{
- case 1:
+ case (8 / FT_CHAR_BIT):
*(FT_Byte*)q = (FT_Byte)val;
break;
- case 2:
+ case (16 / FT_CHAR_BIT):
*(FT_UShort*)q = (FT_UShort)val;
break;
- case 4:
+ case (32 / FT_CHAR_BIT):
*(FT_UInt32*)q = (FT_UInt32)val;
break;