diff options
author | Werner Lemberg <wl@gnu.org> | 2001-06-27 16:18:10 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2001-06-27 16:18:10 +0000 |
commit | 3bf2f63e4a7aa0e95ccaff7b2b3c301afa496eab (patch) | |
tree | b88a1d230e3a4ff8ac6308bcafbfa379f76f03c4 /src/sfnt | |
parent | fe7f3b4f62ec9ddcba8dd3a0597f145854069fa0 (diff) | |
download | freetype2-3bf2f63e4a7aa0e95ccaff7b2b3c301afa496eab.tar.gz |
First round in converting
type foo ( ... )
to
type
foo ( ... )
Other minor formatting issues.
Diffstat (limited to 'src/sfnt')
-rw-r--r-- | src/sfnt/ttload.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index e81e475f8..94494eaa8 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -1617,19 +1617,20 @@ face->kern_table_index = n; /* ensure that the kerning pair table is sorted (yes, some */ - /* fonts have unsorted tables !!) */ + /* fonts have unsorted tables!) */ { FT_UInt i; - TT_Kern_0_Pair* pair; + TT_Kern_0_Pair* pair0; - pair = face->kern_pairs; - for ( i=1; i < num_pairs; i++, pair++ ) + pair0 = face->kern_pairs; + + for ( i = 1; i < num_pairs; i++, pair0++ ) { - if ( tt_kern_pair_compare( pair, pair+1 ) != -1 ) + if ( tt_kern_pair_compare( pair0, pair0 + 1 ) != -1 ) { qsort( (void*)face->kern_pairs, (int)num_pairs, - sizeof(TT_Kern_0_Pair), tt_kern_pair_compare ); + sizeof ( TT_Kern_0_Pair ), tt_kern_pair_compare ); break; } } @@ -1651,11 +1652,13 @@ return error; } + #undef TT_KERN_INDEX -#define TT_KERN_INDEX(g1,g2) (((FT_ULong)g1 << 16) | g2) +#define TT_KERN_INDEX( g1, g2 ) ( ( (FT_ULong)g1 << 16 ) | g2 ) FT_CALLBACK_DEF(int) - tt_kern_pair_compare( const void* a, const void* b ) + tt_kern_pair_compare( const void* a, + const void* b ) { TT_Kern_0_Pair* pair1 = (TT_Kern_0_Pair*)a; TT_Kern_0_Pair* pair2 = (TT_Kern_0_Pair*)b; @@ -1663,12 +1666,14 @@ FT_ULong index1 = TT_KERN_INDEX( pair1->left, pair1->right ); FT_ULong index2 = TT_KERN_INDEX( pair2->left, pair2->right ); + return ( index1 < index2 ? -1 : ( index1 > index2 ? 1 : 0 )); } #undef TT_KERN_INDEX + /*************************************************************************/ /* */ /* <Function> */ |