* src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c (ps_parser_load_field): Use FT_CHAR_BIT.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
diff --git a/ChangeLog b/ChangeLog
index 5da3b0c..3907b9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-21 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c
+ (ps_parser_load_field): Use FT_CHAR_BIT.
+
2004-04-21 David Turner <david@freetype.org>
* src/cff/cffobjs.c (cff_face_init): Fix a small memory leak.
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index c4e5a6c..8f1a98c 100644
--- 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;
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 4d19c70..f37cd35 100644
--- 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;