formatting
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
diff --git a/ChangeLog b/ChangeLog
index 91406dc..77798d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,21 +1,20 @@
2007-03-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * builds/unix/configure.raw: Dequote `OS_INLINE' in
- comment conftest.c, to avoid unexpected shell evaluation.
- Possibly it is a bug or undocumented behaviour of autoconf.
+ * builds/unix/configure.raw: Dequote `OS_INLINE' in comment of
+ conftest.c, to avoid unexpected shell evaluation. Possibly it is a
+ bug or undocumented behaviour of autoconf.
2007-03-18 David Turner <david@freetype.org>
- * src/truetype/ttinterp.c (Ins_MDRP): another bytecode
- regression fix; testing still needed
+ * src/truetype/ttinterp.c (Ins_MDRP): Another bytecode regression
+ fix; testing still needed.
- * src/truetype/ttinterp.c (Ins_MD): another bytecode
- regression fix
+ * src/truetype/ttinterp.c (Ins_MD): Another bytecode regression fix.
2007-03-17 David Turner <david@freetype.org>
- * src/truetype/ttinterp.c (Ins_IP): fixing wrong handling
- of the (undocumented) twilight zone special case.
+ * src/truetype/ttinterp.c (Ins_IP): Fix wrong handling of the
+ (undocumented) twilight zone special case.
2007-03-09 Werner Lemberg <wl@gnu.org>
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 9b34a49..944943e 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -1201,7 +1201,7 @@
lo = l;
l = lo + 0x2000U;
- hi += (l < lo);
+ hi += l < lo;
return ( hi << 18 ) | ( l >> 14 );
}
@@ -2165,7 +2165,7 @@
break;
}
- if ( (selector & 0x0F) == 0 )
+ if ( ( selector & 0x0F ) == 0 )
CUR.threshold = CUR.period - 1;
else
CUR.threshold = ( (FT_Int)( selector & 0x0F ) - 4 ) * CUR.period / 8;
@@ -4663,7 +4663,7 @@
FT_UShort L, K;
- L = (FT_UShort)(CUR.opcode - 0xB0 + 1);
+ L = (FT_UShort)( CUR.opcode - 0xB0 + 1 );
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
@@ -4688,7 +4688,7 @@
FT_UShort L, K;
- L = (FT_UShort)(CUR.opcode - 0xB8 + 1);
+ L = (FT_UShort)( CUR.opcode - 0xB8 + 1 );
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
@@ -4840,8 +4840,8 @@
if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
{
- vec1.x = CUR.zp0.org[L].x - CUR.zp1.org[K].x;
- vec1.y = CUR.zp0.org[L].y - CUR.zp1.org[K].y;
+ vec1.x = CUR.zp0.org[L].x - CUR.zp1.org[K].x;
+ vec1.y = CUR.zp0.org[L].y - CUR.zp1.org[K].y;
}
else
{
@@ -5111,25 +5111,25 @@
A *= 64;
#if 0
- if ( (args[0] & 0x100) != 0 && CUR.metrics.pointSize <= A )
+ if ( ( args[0] & 0x100 ) != 0 && CUR.metrics.pointSize <= A )
CUR.GS.scan_control = TRUE;
#endif
- if ( (args[0] & 0x200) != 0 && CUR.tt_metrics.rotated )
+ if ( ( args[0] & 0x200 ) != 0 && CUR.tt_metrics.rotated )
CUR.GS.scan_control = TRUE;
- if ( (args[0] & 0x400) != 0 && CUR.tt_metrics.stretched )
+ if ( ( args[0] & 0x400 ) != 0 && CUR.tt_metrics.stretched )
CUR.GS.scan_control = TRUE;
#if 0
- if ( (args[0] & 0x800) != 0 && CUR.metrics.pointSize > A )
+ if ( ( args[0] & 0x800 ) != 0 && CUR.metrics.pointSize > A )
CUR.GS.scan_control = FALSE;
#endif
- if ( (args[0] & 0x1000) != 0 && CUR.tt_metrics.rotated )
+ if ( ( args[0] & 0x1000 ) != 0 && CUR.tt_metrics.rotated )
CUR.GS.scan_control = FALSE;
- if ( (args[0] & 0x2000) != 0 && CUR.tt_metrics.stretched )
+ if ( ( args[0] & 0x2000 ) != 0 && CUR.tt_metrics.stretched )
CUR.GS.scan_control = FALSE;
}
@@ -5634,7 +5634,7 @@
CUR.GS.rp1 = CUR.GS.rp0;
CUR.GS.rp2 = point;
- if ( (CUR.opcode & 1) != 0 )
+ if ( ( CUR.opcode & 1 ) != 0 )
CUR.GS.rp0 = point;
}
@@ -5706,7 +5706,7 @@
return;
}
- /* UNDOCUMENTED! */
+ /* XXX: UNDOCUMENTED! */
/* */
/* The behaviour of an MIAP instruction is quite */
/* different when used in the twilight zone. */
@@ -5782,13 +5782,14 @@
#ifdef FIX_BYTECODE
- /* UNDOCUMENTED: twilight zone special case */
+ /* XXX: UNDOCUMENTED: twilight zone special case */
if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
{
FT_Vector* vec1 = &CUR.zp1.org[point];
FT_Vector* vec2 = &CUR.zp0.org[CUR.GS.rp0];
+
org_dist = CUR_Func_dualproj( vec1, vec2 );
}
else
@@ -5807,6 +5808,7 @@
{
FT_Vector vec;
+
vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
@@ -6196,19 +6198,19 @@
* Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0),
* for every n.
*/
- twilight = ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0 );
+ twilight = CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0;
- if (twilight)
- orus_base = &CUR.zp0.org[CUR.GS.rp1];
+ if ( twilight )
+ orus_base = &CUR.zp0.org[CUR.GS.rp1];
else
- orus_base = &CUR.zp0.orus[CUR.GS.rp1];
+ orus_base = &CUR.zp0.orus[CUR.GS.rp1];
cur_base = &CUR.zp0.cur[CUR.GS.rp1];
- /* XXX: There are some glyphs in some braindead but popular */
- /* fonts out there (e.g. [aeu]grave in monotype.ttf) */
- /* calling IP[] with bad values of rp[12]. */
- /* Do something sane when this odd thing happens. */
+ /* XXX: There are some glyphs in some braindead but popular */
+ /* fonts out there (e.g. [aeu]grave in monotype.ttf) */
+ /* calling IP[] with bad values of rp[12]. */
+ /* Do something sane when this odd thing happens. */
if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) ||
BOUNDS( CUR.GS.rp2, CUR.zp1.n_points ) )
{
@@ -6217,12 +6219,14 @@
}
else
{
- if (twilight)
- old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2], orus_base );
+ if ( twilight )
+ old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2],
+ orus_base );
else
- old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2], orus_base );
+ old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2],
+ orus_base );
- cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );
+ cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );
}
for ( ; CUR.GS.loop > 0; --CUR.GS.loop )
@@ -6242,13 +6246,13 @@
continue;
}
- if (twilight)
+ if ( twilight )
org_dist = CUR_Func_dualproj( &CUR.zp2.org[point], orus_base );
else
org_dist = CUR_Func_dualproj( &CUR.zp2.orus[point], orus_base );
cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base );
- new_dist = (old_range != 0)
+ new_dist = ( old_range != 0 )
? TT_MULDIV( org_dist, cur_range, old_range )
: cur_dist;
@@ -6548,7 +6552,7 @@
end_point = CUR.pts.contours[contour] - CUR.pts.first_point;
first_point = point;
- while ( point <= end_point && (CUR.pts.tags[point] & mask) == 0 )
+ while ( point <= end_point && ( CUR.pts.tags[point] & mask ) == 0 )
point++;
if ( point <= end_point )