diff --git a/ChangeLog b/ChangeLog index 5da3b0c99..3907b9c24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-21 Werner Lemberg + + * src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c + (ps_parser_load_field): Use FT_CHAR_BIT. + 2004-04-21 David Turner * 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 c4e5a6c59..8f1a98c55 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 4d19c70a0..f37cd35eb 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;