introduce ft_mem_dup, ft_mem_strdup and ft_mem_strcpyn, and the corresponding

macros to use them (e.g. FT_STRDUP, FT_DUP and FT_STRCPYN)

modify the code to use them instead of raw mallocs/strcpy
This commit is contained in:
David Turner 2007-02-12 14:55:03 +00:00
parent fe33408f9a
commit c0f9c4aadd
13 changed files with 222 additions and 244 deletions

View File

@ -1,3 +1,15 @@
2007-02-12 David Turner <david@freetype.org>
* include/freetype/internal/ftmemory.h, src/base/ftutils.c,
src/bfd/bfddrivr.c, src/bdf/bdflib.c, src/pcf/pcfread.c,
src/cff/cffdrivr.c, src/cff/cffload.c, src/cff/cffobjs.c,
src/sfnt/sfdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
introduce ft_mem_strdup, ft_mem_dup, ft_mem_strcpyn and the
corresponding macros, and modify code to use them. This is to
get rid of various uses of strcpy and other "evil" functions,
as well as simplify a few things
2007-02-11 Werner Lemberg <wl@gnu.org> 2007-02-11 Werner Lemberg <wl@gnu.org>
* src/autofit/afloader.c (af_loader_load_g): Don't change width for * src/autofit/afloader.c (af_loader_load_g): Don't change width for
@ -66,6 +78,7 @@
(gxv_mort_subtable_type1_substTable_validate): Fix debugging (gxv_mort_subtable_type1_substTable_validate): Fix debugging
message. message.
>>>>>>> 1.1514
2007-01-31 Werner Lemberg <wl@gnu.org> 2007-01-31 Werner Lemberg <wl@gnu.org>

View File

@ -441,7 +441,12 @@
while ( 1 ) while ( 1 )
{ {
q = p + FT_MIN( 255, ft_strlen( p ) ); int len = ft_strlen( p );
if (len > 255)
len = 255;
q = p + len;
if ( q == p ) if ( q == p )
return 0; return 0;

View File

@ -322,6 +322,38 @@ FT_BEGIN_HEADER
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
FT_BASE( FT_Pointer )
ft_mem_strdup( FT_Memory memory,
const char* str,
FT_Error *p_error );
FT_BASE( FT_Pointer )
ft_mem_dup( FT_Memory memory,
const void* address,
FT_ULong size,
FT_Error *p_error );
#define FT_MEM_STRDUP(dst,str) \
(dst) = ft_mem_strdup( memory, (const char*)(str), &error )
#define FT_STRDUP(dst,str) \
FT_MEM_SET_ERROR( FT_MEM_STRDUP(dst,str) )
#define FT_MEM_DUP(dst, address,size) \
(dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error )
#define FT_DUP(dst,address,size) \
FT_MEM_SET_ERROR( FT_MEM_DUP(dst,address,size) )
/* returns 1 or more if a trunction occured, 0 if the source string fitted the buffer */
/* this is *not* the same than the normal strlcpy() call */
FT_BASE( FT_Int )
ft_mem_strcpyn( char* dst,
const char* src,
FT_ULong size );
#define FT_STRCPYN(dst,src,size) ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) )
/* */ /* */

View File

@ -172,6 +172,48 @@
} }
FT_BASE_DEF( FT_Pointer )
ft_mem_dup( FT_Memory memory,
const void* address,
FT_ULong size,
FT_Error *p_error )
{
FT_Error error;
FT_Pointer p = ft_mem_qalloc( memory, size, &error );
if (!error && address)
ft_memcpy( p, address, size );
*p_error = error;
return p;
}
FT_BASE_DEF( FT_Pointer )
ft_mem_strdup( FT_Memory memory,
const char* str,
FT_Error *p_error )
{
FT_ULong len = str ? (FT_ULong)ft_strlen(str)+1 : 0;
return ft_mem_dup( memory, str, len, p_error );
}
FT_BASE_DEF( FT_Int )
ft_mem_strcpyn( char* dst,
const char* src,
FT_ULong size )
{
while ( size > 1 && *src != 0 )
*dst++ = *src++;
*dst = 0; /* always zero-terminate */
return (*src != 0);
}
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/

View File

@ -194,11 +194,9 @@ THE SOFTWARE.
bdf_font_t* font = bdf->bdffont; bdf_font_t* font = bdf->bdffont;
bdf_property_t* prop; bdf_property_t* prop;
char *istr = NULL, *bstr = NULL; int nn, len;
char *sstr = NULL, *astr = NULL; char* strings[4] = { NULL, NULL, NULL, NULL };
int lengths[4];
int parts = 0, len = 0;
face->style_flags = 0; face->style_flags = 0;
@ -209,11 +207,9 @@ THE SOFTWARE.
*(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) ) *(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) )
{ {
face->style_flags |= FT_STYLE_FLAG_ITALIC; face->style_flags |= FT_STYLE_FLAG_ITALIC;
istr = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' ) strings[2] = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' )
? (char *)"Oblique" ? (char *)"Oblique"
: (char *)"Italic"; : (char *)"Italic";
len += ft_strlen( istr );
parts++;
} }
prop = bdf_get_font_property( font, (char *)"WEIGHT_NAME" ); prop = bdf_get_font_property( font, (char *)"WEIGHT_NAME" );
@ -222,9 +218,7 @@ THE SOFTWARE.
( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) ) ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )
{ {
face->style_flags |= FT_STYLE_FLAG_BOLD; face->style_flags |= FT_STYLE_FLAG_BOLD;
bstr = (char *)"Bold"; strings[1] = (char *)"Bold";
len += ft_strlen( bstr );
parts++;
} }
prop = bdf_get_font_property( font, (char *)"SETWIDTH_NAME" ); prop = bdf_get_font_property( font, (char *)"SETWIDTH_NAME" );
@ -232,9 +226,7 @@ THE SOFTWARE.
prop->value.atom && *(prop->value.atom) && prop->value.atom && *(prop->value.atom) &&
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
{ {
sstr = (char *)(prop->value.atom); strings[3] = (char *)(prop->value.atom);
len += ft_strlen( sstr );
parts++;
} }
prop = bdf_get_font_property( font, (char *)"ADD_STYLE_NAME" ); prop = bdf_get_font_property( font, (char *)"ADD_STYLE_NAME" );
@ -242,60 +234,64 @@ THE SOFTWARE.
prop->value.atom && *(prop->value.atom) && prop->value.atom && *(prop->value.atom) &&
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
{ {
astr = (char *)(prop->value.atom); strings[0] = (char *)(prop->value.atom);
len += ft_strlen( astr );
parts++;
} }
if ( !parts || !len ) len = 0;
{
if ( FT_ALLOC( face->style_name, ft_strlen( "Regular" ) + 1 ) )
return error;
ft_strcpy( face->style_name, "Regular" ); for (len = 0, nn = 0; nn < 4; nn++)
{
lengths[nn] = 0;
if (strings[nn])
{
lengths[nn] = ft_strlen(strings[nn]);
len += lengths[nn]+1;
}
} }
else
if ( len == 0 )
{ {
char *style, *s; strings[0] = "Regular";
unsigned int i; lengths[0] = ft_strlen(strings[0]);
len = lengths[0]+1;
}
{
char* s;
if ( FT_ALLOC( style, len + parts ) ) if ( FT_ALLOC( face->style_name, len ) )
return error; return error;
s = style; s = face->style_name;
if ( astr ) for (nn = 0; nn < 4; nn++)
{ {
ft_strcpy( s, astr ); char* src = strings[nn];
for ( i = 0; i < ft_strlen( astr ); i++, s++ ) int len = lengths[nn];
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
if ( bstr )
{
ft_strcpy( s, bstr );
s += ft_strlen( bstr );
*(s++) = ' ';
}
if ( istr )
{
ft_strcpy( s, istr );
s += ft_strlen( istr );
*(s++) = ' ';
}
if ( sstr )
{
ft_strcpy( s, sstr );
for ( i = 0; i < ft_strlen( sstr ); i++, s++ )
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
*(--s) = '\0'; /* overwrite last ' ', terminate the string */
face->style_name = style; /* allocated string */ if ( src == NULL )
continue;
/* separate elements with a space */
if (s != face->style_name)
*s++ = ' ';
memcpy( s, src, len );
/* need to convert spaces to dashes for add_style_name and setwidth_name */
if (nn == 0 || nn == 3)
{
int mm;
for (mm = 0; mm < len; mm++)
if (s[mm] == ' ')
s[mm] = '-';
}
s += len;
}
*s = 0;
} }
return error; return error;
@ -394,12 +390,8 @@ THE SOFTWARE.
prop = bdf_get_font_property( font, "FAMILY_NAME" ); prop = bdf_get_font_property( font, "FAMILY_NAME" );
if ( prop && prop->value.atom ) if ( prop && prop->value.atom )
{ {
int l = ft_strlen( prop->value.atom ) + 1; if ( FT_STRDUP( bdfface->family_name, prop->value.atom ) )
if ( FT_NEW_ARRAY( bdfface->family_name, l ) )
goto Exit; goto Exit;
ft_strcpy( bdfface->family_name, prop->value.atom );
} }
else else
bdfface->family_name = 0; bdfface->family_name = 0;
@ -503,15 +495,9 @@ THE SOFTWARE.
const char* s; const char* s;
if ( FT_NEW_ARRAY( face->charset_encoding, if ( FT_STRDUP( face->charset_encoding, charset_encoding->value.atom ) ||
ft_strlen( charset_encoding->value.atom ) + 1 ) ) FT_STRDUP( face->charset_registry, charset_registry->value.atom ) )
goto Exit; goto Exit;
if ( FT_NEW_ARRAY( face->charset_registry,
ft_strlen( charset_registry->value.atom ) + 1 ) )
goto Exit;
ft_strcpy( face->charset_registry, charset_registry->value.atom );
ft_strcpy( face->charset_encoding, charset_encoding->value.atom );
/* Uh, oh, compare first letters manually to avoid dependency /* Uh, oh, compare first letters manually to avoid dependency
on locales. */ on locales. */

View File

@ -1253,7 +1253,6 @@
{ {
unsigned long propid; unsigned long propid;
hashnode hn; hashnode hn;
int len;
bdf_property_t *prop, *fp; bdf_property_t *prop, *fp;
FT_Memory memory = font->memory; FT_Memory memory = font->memory;
FT_Error error = BDF_Err_Ok; FT_Error error = BDF_Err_Ok;
@ -1272,19 +1271,11 @@
/* Delete the current atom if it exists. */ /* Delete the current atom if it exists. */
FT_FREE( fp->value.atom ); FT_FREE( fp->value.atom );
if ( value == 0 ) if ( value && value[0] != 0 )
len = 1;
else
len = ft_strlen( value ) + 1;
if ( len > 1 )
{ {
if ( FT_NEW_ARRAY( fp->value.atom, len ) ) if ( FT_STRDUP( fp->value.atom, value ) )
goto Exit; goto Exit;
FT_MEM_COPY( fp->value.atom, value, len );
} }
else
fp->value.atom = 0;
break; break;
case BDF_INTEGER: case BDF_INTEGER:
@ -1349,19 +1340,12 @@
switch ( prop->format ) switch ( prop->format )
{ {
case BDF_ATOM: case BDF_ATOM:
if ( value == 0 ) fp->value.atom = 0;
len = 1; if ( value != 0 && value[0] )
else
len = ft_strlen( value ) + 1;
if ( len > 1 )
{ {
if ( FT_NEW_ARRAY( fp->value.atom, len ) ) if ( FT_STRDUP( fp->value.atom, value ) )
goto Exit; goto Exit;
FT_MEM_COPY( fp->value.atom, value, len );
} }
else
fp->value.atom = 0;
break; break;
case BDF_INTEGER: case BDF_INTEGER:

View File

@ -220,17 +220,8 @@
/* now, lookup the name itself */ /* now, lookup the name itself */
gname = cff_index_get_sid_string( &font->string_index, sid, psnames ); gname = cff_index_get_sid_string( &font->string_index, sid, psnames );
if ( gname && buffer_max > 0 ) if ( gname )
{ FT_STRCPYN( buffer, gname, buffer_max );
FT_UInt len = (FT_UInt)ft_strlen( gname );
if ( len >= buffer_max )
len = buffer_max - 1;
FT_MEM_COPY( buffer, gname, len );
((FT_Byte*)buffer)[len] = 0;
}
FT_FREE( gname ); FT_FREE( gname );
error = CFF_Err_Ok; error = CFF_Err_Ok;

View File

@ -570,7 +570,6 @@
{ {
FT_String* name = 0; FT_String* name = 0;
const char* adobe_name = psnames->adobe_std_strings( sid ); const char* adobe_name = psnames->adobe_std_strings( sid );
FT_UInt len;
if ( adobe_name ) if ( adobe_name )
@ -579,12 +578,7 @@
FT_Error error; FT_Error error;
len = (FT_UInt)ft_strlen( adobe_name ); (void)FT_STRDUP( name, adobe_name );
if ( !FT_ALLOC( name, len + 1 ) )
{
FT_MEM_COPY( name, adobe_name, len );
name[len] = 0;
}
FT_UNUSED( error ); FT_UNUSED( error );
} }

View File

@ -285,17 +285,9 @@
const FT_String* source ) const FT_String* source )
{ {
FT_Error error; FT_Error error;
FT_String* result = 0; FT_String* result;
FT_Int len = (FT_Int)ft_strlen( source );
result = ft_mem_strdup(memory, source, &error);
if ( !FT_ALLOC( result, len + 1 ) )
{
FT_MEM_COPY( result, source, len );
result[len] = 0;
}
FT_UNUSED( error );
return result; return result;
} }

View File

@ -513,10 +513,8 @@ THE SOFTWARE.
goto Bail; goto Bail;
} }
if ( FT_NEW_ARRAY( properties[i].name, if ( FT_STRDUP( properties[i].name, strings + name_offset ) )
ft_strlen( strings + name_offset ) + 1 ) )
goto Bail; goto Bail;
ft_strcpy( properties[i].name, strings + name_offset );
FT_TRACE4(( " %s:", properties[i].name )); FT_TRACE4(( " %s:", properties[i].name ));
@ -534,10 +532,8 @@ THE SOFTWARE.
goto Bail; goto Bail;
} }
if ( FT_NEW_ARRAY( properties[i].value.atom, if ( FT_STRDUP( properties[i].value.atom, strings + value_offset ) )
ft_strlen( strings + value_offset ) + 1 ) )
goto Bail; goto Bail;
ft_strcpy( properties[i].value.atom, strings + props[i].value );
FT_TRACE4(( " `%s'\n", properties[i].value.atom )); FT_TRACE4(( " `%s'\n", properties[i].value.atom ));
} }
@ -993,10 +989,9 @@ THE SOFTWARE.
PCF_Property prop; PCF_Property prop;
char *istr = NULL, *bstr = NULL; int nn, len;
char *sstr = NULL, *astr = NULL; char* strings[4] = { NULL, NULL, NULL, NULL };
int lengths[4];
int parts = 0, len = 0;
face->style_flags = 0; face->style_flags = 0;
@ -1007,11 +1002,9 @@ THE SOFTWARE.
*(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) ) *(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) )
{ {
face->style_flags |= FT_STYLE_FLAG_ITALIC; face->style_flags |= FT_STYLE_FLAG_ITALIC;
istr = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' ) strings[2] = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' )
? (char *)"Oblique" ? (char *)"Oblique"
: (char *)"Italic"; : (char *)"Italic";
len += ft_strlen( istr );
parts++;
} }
prop = pcf_find_property( pcf, "WEIGHT_NAME" ); prop = pcf_find_property( pcf, "WEIGHT_NAME" );
@ -1019,9 +1012,7 @@ THE SOFTWARE.
( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) ) ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )
{ {
face->style_flags |= FT_STYLE_FLAG_BOLD; face->style_flags |= FT_STYLE_FLAG_BOLD;
bstr = (char *)"Bold"; strings[1] = (char *)"Bold";
len += ft_strlen( bstr );
parts++;
} }
prop = pcf_find_property( pcf, "SETWIDTH_NAME" ); prop = pcf_find_property( pcf, "SETWIDTH_NAME" );
@ -1029,9 +1020,7 @@ THE SOFTWARE.
*(prop->value.atom) && *(prop->value.atom) &&
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
{ {
sstr = (char *)(prop->value.atom); strings[3] = (char *)(prop->value.atom);
len += ft_strlen( sstr );
parts++;
} }
prop = pcf_find_property( pcf, "ADD_STYLE_NAME" ); prop = pcf_find_property( pcf, "ADD_STYLE_NAME" );
@ -1039,60 +1028,62 @@ THE SOFTWARE.
*(prop->value.atom) && *(prop->value.atom) &&
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
{ {
astr = (char *)(prop->value.atom); strings[0] = (char *)(prop->value.atom);
len += ft_strlen( astr );
parts++;
} }
if ( !parts || !len ) for (len = 0, nn = 0; nn < 4; nn++)
{ {
if ( FT_ALLOC( face->style_name, 8 ) ) lengths[nn] = 0;
return error; if (strings[nn])
ft_strcpy( face->style_name, "Regular" ); {
face->style_name[7] = '\0'; lengths[nn] = ft_strlen(strings[nn]);
len += lengths[nn]+1;
}
} }
else
if ( len == 0 )
{ {
char *style, *s; strings[0] = "Regular";
unsigned int i; lengths[0] = ft_strlen(strings[0]);
len = lengths[0]+1;
}
{
char* s;
if ( FT_ALLOC( style, len + parts ) ) if ( FT_ALLOC( face->style_name, len ) )
return error; return error;
s = style; s = face->style_name;
if ( astr ) for (nn = 0; nn < 4; nn++)
{ {
ft_strcpy( s, astr ); char* src = strings[nn];
for ( i = 0; i < ft_strlen( astr ); i++, s++ ) int len = lengths[nn];
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
if ( bstr )
{
ft_strcpy( s, bstr );
s += ft_strlen( bstr );
*(s++) = ' ';
}
if ( istr )
{
ft_strcpy( s, istr );
s += ft_strlen( istr );
*(s++) = ' ';
}
if ( sstr )
{
ft_strcpy( s, sstr );
for ( i = 0; i < ft_strlen( sstr ); i++, s++ )
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
*(--s) = '\0'; /* overwrite last ' ', terminate the string */
face->style_name = style; /* allocated string */ if ( src == NULL )
continue;
/* separate elements with a space */
if (s != face->style_name)
*s++ = ' ';
memcpy( s, src, len );
/* need to convert spaces to dashes for add_style_name and setwidth_name */
if (nn == 0 || nn == 3)
{
int mm;
for (mm = 0; mm < len; mm++)
if (s[mm] == ' ')
s[mm] = '-';
}
s += len;
}
*s = 0;
} }
return error; return error;
@ -1173,12 +1164,8 @@ THE SOFTWARE.
prop = pcf_find_property( face, "FAMILY_NAME" ); prop = pcf_find_property( face, "FAMILY_NAME" );
if ( prop && prop->isString ) if ( prop && prop->isString )
{ {
int l = ft_strlen( prop->value.atom ) + 1; if ( FT_STRDUP( root->family_name, prop->value.atom ) )
if ( FT_NEW_ARRAY( root->family_name, l ) )
goto Exit; goto Exit;
ft_strcpy( root->family_name, prop->value.atom );
} }
else else
root->family_name = NULL; root->family_name = NULL;
@ -1256,16 +1243,9 @@ THE SOFTWARE.
if ( charset_registry && charset_registry->isString && if ( charset_registry && charset_registry->isString &&
charset_encoding && charset_encoding->isString ) charset_encoding && charset_encoding->isString )
{ {
if ( FT_NEW_ARRAY( face->charset_encoding, if ( FT_STRDUP( face->charset_encoding, charset_encoding->value.atom ) ||
ft_strlen( charset_encoding->value.atom ) + 1 ) ) FT_STRDUP( face->charset_registry, charset_registry->value.atom ) )
goto Exit; goto Exit;
if ( FT_NEW_ARRAY( face->charset_registry,
ft_strlen( charset_registry->value.atom ) + 1 ) )
goto Exit;
ft_strcpy( face->charset_registry, charset_registry->value.atom );
ft_strcpy( face->charset_encoding, charset_encoding->value.atom );
} }
} }
} }

View File

@ -144,17 +144,8 @@
error = tt_face_get_ps_name( face, glyph_index, &gname ); error = tt_face_get_ps_name( face, glyph_index, &gname );
if ( !error && buffer_max > 0 ) if ( !error )
{ FT_STRCPYN( buffer, gname, buffer_max );
FT_UInt len = (FT_UInt)( ft_strlen( gname ) );
if ( len >= buffer_max )
len = buffer_max - 1;
FT_MEM_COPY( buffer, gname, len );
((FT_Byte*)buffer)[len] = 0;
}
return error; return error;
} }

View File

@ -59,23 +59,7 @@
FT_Pointer buffer, FT_Pointer buffer,
FT_UInt buffer_max ) FT_UInt buffer_max )
{ {
FT_String* gname; FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
gname = face->type1.glyph_names[glyph_index];
if ( buffer_max > 0 )
{
FT_UInt len = (FT_UInt)( ft_strlen( gname ) );
if (len >= buffer_max)
len = buffer_max - 1;
FT_MEM_COPY( buffer, gname, len );
((FT_Byte*)buffer)[len] = 0;
}
return T1_Err_Ok; return T1_Err_Ok;
} }

View File

@ -61,23 +61,7 @@
FT_Pointer buffer, FT_Pointer buffer,
FT_UInt buffer_max ) FT_UInt buffer_max )
{ {
FT_String* gname; FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
gname = face->type1.glyph_names[glyph_index];
if ( buffer_max > 0 )
{
FT_UInt len = (FT_UInt)( ft_strlen( gname ) );
if ( len >= buffer_max )
len = buffer_max - 1;
FT_MEM_COPY( buffer, gname, len );
((FT_Byte*)buffer)[len] = 0;
}
return T42_Err_Ok; return T42_Err_Ok;
} }
@ -94,7 +78,7 @@
{ {
gname = face->type1.glyph_names[i]; gname = face->type1.glyph_names[i];
if ( !ft_strcmp( glyph_name, gname ) ) if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] ); return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
} }