Whitespace.

This commit is contained in:
Werner Lemberg 2022-04-01 08:50:33 +02:00
parent d247c56278
commit 695d606ae5
26 changed files with 60 additions and 59 deletions

View File

@ -314,7 +314,7 @@
NULL, NULL, NULL ) ) NULL, NULL, NULL ) )
return ( OSType ) 0; return ( OSType ) 0;
return ((FInfo *)(info.finderInfo))->fdType; return ( (FInfo *)( info.finderInfo ) )->fdType;
} }
@ -462,7 +462,7 @@
if ( ps_name_len != 0 ) if ( ps_name_len != 0 )
{ {
ft_memcpy(ps_name, names[0] + 1, ps_name_len); ft_memcpy( ps_name, names[0] + 1, ps_name_len );
ps_name[ps_name_len] = 0; ps_name[ps_name_len] = 0;
} }
if ( style->indexes[face_index] > 1 && if ( style->indexes[face_index] > 1 &&

View File

@ -402,17 +402,17 @@
FT_Long *result_offset ); FT_Long *result_offset );
CONST_FT_RFORK_RULE_ARRAY_BEGIN(ft_raccess_guess_table, CONST_FT_RFORK_RULE_ARRAY_BEGIN( ft_raccess_guess_table,
ft_raccess_guess_rec) ft_raccess_guess_rec )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_double, apple_double) CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_double, apple_double )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_single, apple_single) CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_single, apple_single )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_ufs_export, darwin_ufs_export) CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_ufs_export, darwin_ufs_export )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_newvfs, darwin_newvfs) CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_newvfs, darwin_newvfs )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_hfsplus, darwin_hfsplus) CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_hfsplus, darwin_hfsplus )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(vfat, vfat) CONST_FT_RFORK_RULE_ARRAY_ENTRY( vfat, vfat )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_cap, linux_cap) CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_cap, linux_cap )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_double, linux_double) CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_double, linux_double )
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_netatalk, linux_netatalk) CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_netatalk, linux_netatalk )
CONST_FT_RFORK_RULE_ARRAY_END CONST_FT_RFORK_RULE_ARRAY_END

View File

@ -57,8 +57,9 @@
/* it is better to use FreeType memory routines instead of raw /* it is better to use FreeType memory routines instead of raw
'malloc/free' */ 'malloc/free' */
typedef void *(* alloc_func)(void*, int, int); typedef void* (*alloc_func)( void*, int, int );
typedef void (* free_func)(void*, void*); typedef void (*free_func) ( void*, void* );
static void* static void*
ft_bzip2_alloc( FT_Memory memory, ft_bzip2_alloc( FT_Memory memory,

View File

@ -210,7 +210,7 @@ FT_BEGIN_HEADER
#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \ #define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \
FT_BEGIN_STMNT \ FT_BEGIN_STMNT \
FTC_Node *_bucket, *_pnode, _node; \ FTC_Node *_bucket, *_pnode, _node; \
FTC_Cache _cache = FTC_CACHE(cache); \ FTC_Cache _cache = FTC_CACHE( cache ); \
FT_Offset _hash = (FT_Offset)(hash); \ FT_Offset _hash = (FT_Offset)(hash); \
FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \ FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
FT_Bool _list_changed = FALSE; \ FT_Bool _list_changed = FALSE; \

View File

@ -140,8 +140,8 @@ FT_BEGIN_HEADER
} FTC_FamilyRec, *FTC_Family; } FTC_FamilyRec, *FTC_Family;
#define FTC_FAMILY(x) ( (FTC_Family)(x) ) #define FTC_FAMILY( x ) ( (FTC_Family)(x) )
#define FTC_FAMILY_P(x) ( (FTC_Family*)(x) ) #define FTC_FAMILY_P( x ) ( (FTC_Family*)(x) )
typedef struct FTC_GNodeRec_ typedef struct FTC_GNodeRec_
@ -245,7 +245,7 @@ FT_BEGIN_HEADER
#define FTC_GCACHE_CLASS( x ) ((FTC_GCacheClass)(x)) #define FTC_GCACHE_CLASS( x ) ((FTC_GCacheClass)(x))
#define FTC_CACHE_GCACHE_CLASS( x ) \ #define FTC_CACHE_GCACHE_CLASS( x ) \
FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class ) FTC_GCACHE_CLASS( FTC_CACHE( x )->org_class )
#define FTC_CACHE_FAMILY_CLASS( x ) \ #define FTC_CACHE_FAMILY_CLASS( x ) \
( (FTC_MruListClass)FTC_CACHE_GCACHE_CLASS( x )->family_class ) ( (FTC_MruListClass)FTC_CACHE_GCACHE_CLASS( x )->family_class )

View File

@ -51,8 +51,8 @@ FT_BEGIN_HEADER
} FTC_INodeRec, *FTC_INode; } FTC_INodeRec, *FTC_INode;
#define FTC_INODE( x ) ( (FTC_INode)( x ) ) #define FTC_INODE( x ) ( (FTC_INode)( x ) )
#define FTC_INODE_GINDEX( x ) FTC_GNODE(x)->gindex #define FTC_INODE_GINDEX( x ) FTC_GNODE( x )->gindex
#define FTC_INODE_FAMILY( x ) FTC_GNODE(x)->family #define FTC_INODE_FAMILY( x ) FTC_GNODE( x )->family
typedef FT_Error typedef FT_Error
(*FTC_IFamily_LoadGlyphFunc)( FTC_Family family, (*FTC_IFamily_LoadGlyphFunc)( FTC_Family family,
@ -72,7 +72,7 @@ FT_BEGIN_HEADER
#define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x)) #define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x))
#define FTC_CACHE_IFAMILY_CLASS( x ) \ #define FTC_CACHE_IFAMILY_CLASS( x ) \
FTC_IFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS(x)->family_class ) FTC_IFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class )
/* can be used as a @FTC_Node_FreeFunc */ /* can be used as a @FTC_Node_FreeFunc */

View File

@ -171,7 +171,7 @@
sbit->xadvance = (FT_Char)xadvance; sbit->xadvance = (FT_Char)xadvance;
sbit->yadvance = (FT_Char)yadvance; sbit->yadvance = (FT_Char)yadvance;
sbit->format = (FT_Byte)bitmap->pixel_mode; sbit->format = (FT_Byte)bitmap->pixel_mode;
sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1); sbit->max_grays = (FT_Byte)( bitmap->num_grays - 1 );
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{ {

View File

@ -61,7 +61,7 @@ FT_BEGIN_HEADER
typedef const FTC_SFamilyClassRec* FTC_SFamilyClass; typedef const FTC_SFamilyClassRec* FTC_SFamilyClass;
#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x)) #define FTC_SFAMILY_CLASS( x ) ( (FTC_SFamilyClass)(x) )
#define FTC_CACHE_SFAMILY_CLASS( x ) \ #define FTC_CACHE_SFAMILY_CLASS( x ) \
FTC_SFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class ) FTC_SFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class )

View File

@ -81,7 +81,7 @@
if ( char_code < 255 ) if ( char_code < 255 )
{ {
FT_UInt code = (FT_UInt)(char_code + 1); FT_UInt code = (FT_UInt)( char_code + 1 );
for (;;) for (;;)

View File

@ -75,7 +75,7 @@
#endif /* FT_CONFIG_OPTION_INCREMENTAL */ #endif /* FT_CONFIG_OPTION_INCREMENTAL */
{ {
CFF_Font cff = (CFF_Font)(face->extra.data); CFF_Font cff = (CFF_Font)( face->extra.data );
return cff_index_access_element( &cff->charstrings_index, glyph_index, return cff_index_access_element( &cff->charstrings_index, glyph_index,
@ -111,7 +111,7 @@
#endif /* FT_CONFIG_OPTION_INCREMENTAL */ #endif /* FT_CONFIG_OPTION_INCREMENTAL */
{ {
CFF_Font cff = (CFF_Font)(face->extra.data); CFF_Font cff = (CFF_Font)( face->extra.data );
cff_index_forget_element( &cff->charstrings_index, pointer ); cff_index_forget_element( &cff->charstrings_index, pointer );

View File

@ -1033,7 +1033,7 @@
GXV_NAME_ENTER( "StateArray" ); GXV_NAME_ENTER( "StateArray" );
GXV_TRACE(( "parse %d bytes by stateSize=%d maxClassID=%d\n", GXV_TRACE(( "parse %d bytes by stateSize=%d maxClassID=%d\n",
(int)(*length_p), stateSize, (int)(maxClassID) )); (int)( *length_p ), stateSize, (int)maxClassID ));
/* /*
* 2 states are predefined and must be described in StateArray: * 2 states are predefined and must be described in StateArray:
@ -1418,7 +1418,7 @@
GXV_NAME_ENTER( "XStateArray" ); GXV_NAME_ENTER( "XStateArray" );
GXV_TRACE(( "parse % 3d bytes by stateSize=% 3d maxClassID=% 3d\n", GXV_TRACE(( "parse % 3d bytes by stateSize=% 3d maxClassID=% 3d\n",
(int)(*length_p), (int)stateSize, (int)(maxClassID) )); (int)( *length_p ), (int)stateSize, (int)maxClassID ));
/* /*
* 2 states are predefined and must be described: * 2 states are predefined and must be described:

View File

@ -207,7 +207,7 @@
pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 ); pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 );
if ( pfrface->height < pfrface->ascender - pfrface->descender ) if ( pfrface->height < pfrface->ascender - pfrface->descender )
pfrface->height = (FT_Short)(pfrface->ascender - pfrface->descender); pfrface->height = (FT_Short)( pfrface->ascender - pfrface->descender );
if ( phy_font->num_strikes > 0 ) if ( phy_font->num_strikes > 0 )
{ {

View File

@ -248,7 +248,7 @@
else else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */ #endif /* FT_CONFIG_OPTION_INCREMENTAL */
{ {
CFF_Font cff = (CFF_Font)(face->extra.data); CFF_Font cff = (CFF_Font)( face->extra.data );
bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar ); bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );

View File

@ -535,11 +535,11 @@
if ( r & 1 ) if ( r & 1 )
{ {
*buffer = (FT_Byte)(*buffer + c); *buffer = (FT_Byte)( *buffer + c );
buffer++; buffer++;
} }
else else
*buffer = (FT_Byte)(c << 4); *buffer = (FT_Byte)( c << 4 );
r++; r++;
} }
@ -572,8 +572,8 @@
if ( p >= limit ) if ( p >= limit )
return 0; return 0;
if ( n > (FT_UInt)(limit - p) ) if ( n > (FT_UInt)( limit - p ) )
n = (FT_UInt)(limit - p); n = (FT_UInt)( limit - p );
for ( r = 0; r < n; r++ ) for ( r = 0; r < n; r++ )
{ {

View File

@ -518,7 +518,7 @@
if ( *cur == '<' ) /* <...> */ if ( *cur == '<' ) /* <...> */
{ {
if ( cur + 1 < limit && *(cur + 1) == '<' ) /* << */ if ( cur + 1 < limit && *( cur + 1 ) == '<' ) /* << */
{ {
cur++; cur++;
cur++; cur++;

View File

@ -2269,7 +2269,7 @@
/* This is due to the fact that, in the vast majority of cases, */ /* This is due to the fact that, in the vast majority of cases, */
/* the span length in bytes is relatively small. */ /* the span length in bytes is relatively small. */
while ( --c2 > 0 ) while ( --c2 > 0 )
*(++target) = 0xFF; *( ++target ) = 0xFF;
target[1] |= f2; target[1] |= f2;
} }

View File

@ -3014,7 +3014,7 @@
diff = current_dist.distance - min_dist.distance; diff = current_dist.distance - min_dist.distance;
if ( FT_ABS(diff ) < CORNER_CHECK_EPSILON ) if ( FT_ABS( diff ) < CORNER_CHECK_EPSILON )
min_dist = resolve_corner( min_dist, current_dist ); min_dist = resolve_corner( min_dist, current_dist );
else if ( diff < 0 ) else if ( diff < 0 )
min_dist = current_dist; min_dist = current_dist;

View File

@ -367,7 +367,7 @@
} }
/* transform transparency to alpha */ /* transform transparency to alpha */
if ( png_get_valid(png, info, PNG_INFO_tRNS ) ) if ( png_get_valid( png, info, PNG_INFO_tRNS ) )
png_set_tRNS_to_alpha( png ); png_set_tRNS_to_alpha( png );
if ( bitdepth == 16 ) if ( bitdepth == 16 )
@ -387,7 +387,7 @@
png_set_filler( png, 0xFF, PNG_FILLER_AFTER ); png_set_filler( png, 0xFF, PNG_FILLER_AFTER );
/* recheck header after setting EXPAND options */ /* recheck header after setting EXPAND options */
png_read_update_info(png, info ); png_read_update_info( png, info );
png_get_IHDR( png, info, png_get_IHDR( png, info,
&imgWidth, &imgHeight, &imgWidth, &imgHeight,
&bitdepth, &color_type, &interlace, &bitdepth, &color_type, &interlace,

View File

@ -2104,7 +2104,7 @@
error = FT_THROW( Invalid_Table ); error = FT_THROW( Invalid_Table );
goto Exit; goto Exit;
} }
file_offset = ROUND4(woff2.metaOffset + woff2.metaLength); file_offset = ROUND4( woff2.metaOffset + woff2.metaLength );
} }
if ( woff2.privOffset ) if ( woff2.privOffset )
@ -2114,7 +2114,7 @@
error = FT_THROW( Invalid_Table ); error = FT_THROW( Invalid_Table );
goto Exit; goto Exit;
} }
file_offset = ROUND4(woff2.privOffset + woff2.privLength); file_offset = ROUND4( woff2.privOffset + woff2.privLength );
} }
if ( file_offset != ( ROUND4( woff2.length ) ) ) if ( file_offset != ( ROUND4( woff2.length ) ) )

View File

@ -465,7 +465,7 @@
if ( subheader ) if ( subheader )
{ {
FT_Byte* p = subheader; FT_Byte* p = subheader;
FT_UInt idx = (FT_UInt)(char_code & 0xFF); FT_UInt idx = (FT_UInt)( char_code & 0xFF );
FT_UInt start, count; FT_UInt start, count;
FT_Int delta; FT_Int delta;
FT_UInt offset; FT_UInt offset;

View File

@ -1228,8 +1228,8 @@
p1 = gloader->base.outline.points + k; p1 = gloader->base.outline.points + k;
p2 = gloader->base.outline.points + l; p2 = gloader->base.outline.points + l;
x = SUB_LONG(p1->x, p2->x); x = SUB_LONG( p1->x, p2->x );
y = SUB_LONG(p1->y, p2->y); y = SUB_LONG( p1->y, p2->y );
} }
else else
{ {
@ -2255,7 +2255,7 @@
if ( loader->widthp ) if ( loader->widthp )
glyph->metrics.horiAdvance = loader->widthp[glyph_index] * 64; glyph->metrics.horiAdvance = loader->widthp[glyph_index] * 64;
else else
glyph->metrics.horiAdvance = SUB_LONG(loader->pp2.x, loader->pp1.x); glyph->metrics.horiAdvance = SUB_LONG( loader->pp2.x, loader->pp1.x );
/* set glyph dimensions */ /* set glyph dimensions */
glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin ); glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin );

View File

@ -203,7 +203,7 @@
kp->index1 = FT_Get_Char_Index( t1_face, p[0] ); kp->index1 = FT_Get_Char_Index( t1_face, p[0] );
kp->index2 = FT_Get_Char_Index( t1_face, p[1] ); kp->index2 = FT_Get_Char_Index( t1_face, p[1] );
kp->x = (FT_Int)FT_PEEK_SHORT_LE(p + 2); kp->x = (FT_Int)FT_PEEK_SHORT_LE( p + 2 );
kp->y = 0; kp->y = 0;
kp++; kp++;

View File

@ -2057,9 +2057,9 @@
name_table->elements[n][len] = '\0'; name_table->elements[n][len] = '\0';
/* record index of /.notdef */ /* record index of /.notdef */
if ( *cur == '.' && if ( *cur == '.' &&
ft_strcmp( ".notdef", ft_strcmp( ".notdef",
(const char*)(name_table->elements[n]) ) == 0 ) (const char*)( name_table->elements[n] ) ) == 0 )
{ {
notdef_index = n; notdef_index = n;
notdef_found = 1; notdef_found = 1;
@ -2331,8 +2331,8 @@
/* in valid Type 1 fonts we don't see `RD' or `-|' directly */ /* in valid Type 1 fonts we don't see `RD' or `-|' directly */
/* since those tokens are handled by parse_subrs and */ /* since those tokens are handled by parse_subrs and */
/* parse_charstrings */ /* parse_charstrings */
else if ( *cur == 'R' && cur + 6 < limit && *(cur + 1) == 'D' && else if ( *cur == 'R' && cur + 6 < limit && *( cur + 1 ) == 'D' &&
have_integer ) have_integer )
{ {
FT_ULong s; FT_ULong s;
FT_Byte* b; FT_Byte* b;
@ -2344,8 +2344,8 @@
have_integer = 0; have_integer = 0;
} }
else if ( *cur == '-' && cur + 6 < limit && *(cur + 1) == '|' && else if ( *cur == '-' && cur + 6 < limit && *( cur + 1 ) == '|' &&
have_integer ) have_integer )
{ {
FT_ULong s; FT_ULong s;
FT_Byte* b; FT_Byte* b;

View File

@ -148,7 +148,7 @@
t42_loader_done( &loader ); t42_loader_done( &loader );
if ( error ) if ( error )
{ {
FT_FREE(face->ttf_data); FT_FREE( face->ttf_data );
face->ttf_size = 0; face->ttf_size = 0;
} }
return error; return error;

View File

@ -92,7 +92,7 @@
#undef T1CODE #undef T1CODE
#define T1CODE T1_FIELD_LOCATION_BBOX #define T1CODE T1_FIELD_LOCATION_BBOX
T1_FIELD_BBOX("FontBBox", xMin, 0 ) T1_FIELD_BBOX( "FontBBox", xMin, 0 )
T1_FIELD_CALLBACK( "FontMatrix", t42_parse_font_matrix, 0 ) T1_FIELD_CALLBACK( "FontMatrix", t42_parse_font_matrix, 0 )
T1_FIELD_CALLBACK( "Encoding", t42_parse_encoding, 0 ) T1_FIELD_CALLBACK( "Encoding", t42_parse_encoding, 0 )
@ -1008,9 +1008,9 @@
name_table->elements[n][len] = '\0'; name_table->elements[n][len] = '\0';
/* record index of /.notdef */ /* record index of /.notdef */
if ( *cur == '.' && if ( *cur == '.' &&
ft_strcmp( ".notdef", ft_strcmp( ".notdef",
(const char*)(name_table->elements[n]) ) == 0 ) (const char*)( name_table->elements[n] ) ) == 0 )
{ {
notdef_index = n; notdef_index = n;
notdef_found = 1; notdef_found = 1;

View File

@ -489,7 +489,7 @@
&dir_entry1 ) ) &dir_entry1 ) )
goto Exit; goto Exit;
if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ ) if ( !( dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ )
{ {
error = FT_THROW( Invalid_File_Format ); error = FT_THROW( Invalid_File_Format );
goto Exit; goto Exit;
@ -513,7 +513,7 @@
&dir_entry2 ) ) &dir_entry2 ) )
goto Exit; goto Exit;
if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ ) if ( !( dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ )
{ {
error = FT_THROW( Invalid_File_Format ); error = FT_THROW( Invalid_File_Format );
goto Exit; goto Exit;