* src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c

(ps_parser_load_field): Use FT_CHAR_BIT.
This commit is contained in:
Werner Lemberg 2004-04-24 06:06:39 +00:00
parent 07dcc10170
commit 2b32a177f3
3 changed files with 15 additions and 10 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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;