psaux: Handle the string length by FT_Offset variables.

int-not32-changes
suzuki toshiya 16 years ago
parent 74d4783ec1
commit a0f7778bd4
  1. 17
      ChangeLog
  2. 22
      src/psaux/afmparse.c
  3. 2
      src/psaux/afmparse.h

@ -1,3 +1,20 @@
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
psaux: Handle the string length by FT_Offset variables.
* src/psaux/afmparse.c (afm_parser_next_key,
afm_tokenize, afm_parse_track_kern,
afm_parse_kern_pairs, afm_parse_kern_data,
afm_parser_skip_section, afm_parser_parse):
The length of key is handled by FT_Offset,
instead of FT_UInt. Although the length of
PostScript strings or name object is 16-bit,
AFM_STREAM_KEY_LEN() calculates the length
from the pointer difference.
* src/psaux/afmparse.h (afm_parser_next_key):
Ditto.
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
pcf: Fix some data types mismatching with their sources.

@ -440,7 +440,7 @@
FT_LOCAL_DEF( char* )
afm_parser_next_key( AFM_Parser parser,
FT_Bool line,
FT_UInt* len )
FT_Offset* len )
{
AFM_Stream stream = parser->stream;
char* key = 0; /* make stupid compiler happy */
@ -488,7 +488,7 @@
}
if ( len )
*len = ( key ) ? AFM_STREAM_KEY_LEN( stream, key )
*len = ( key ) ? (FT_Offset)AFM_STREAM_KEY_LEN( stream, key )
: 0;
return key;
@ -497,7 +497,7 @@
static AFM_Token
afm_tokenize( const char* key,
FT_UInt len )
FT_Offset len )
{
int n;
@ -585,7 +585,7 @@
AFM_FontInfo fi = parser->FontInfo;
AFM_TrackKern tk;
char* key;
FT_UInt len;
FT_Offset len;
int n = -1;
@ -686,7 +686,7 @@
AFM_FontInfo fi = parser->FontInfo;
AFM_KernPair kp;
char* key;
FT_UInt len;
FT_Offset len;
int n = -1;
@ -774,9 +774,9 @@
static FT_Error
afm_parse_kern_data( AFM_Parser parser )
{
FT_Error error;
char* key;
FT_UInt len;
FT_Error error;
char* key;
FT_Offset len;
while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )
@ -818,8 +818,8 @@
FT_UInt n,
AFM_Token end_section )
{
char* key;
FT_UInt len;
char* key;
FT_Offset len;
while ( n-- > 0 )
@ -850,7 +850,7 @@
AFM_FontInfo fi = parser->FontInfo;
FT_Error error = PSaux_Err_Syntax_Error;
char* key;
FT_UInt len;
FT_Offset len;
FT_Int metrics_sets = 0;

@ -77,7 +77,7 @@ FT_BEGIN_HEADER
FT_LOCAL( char* )
afm_parser_next_key( AFM_Parser parser,
FT_Bool line,
FT_UInt* len );
FT_Offset* len );
FT_END_HEADER

Loading…
Cancel
Save