* src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up to avoid compiler warnings. * src/autofit/afwarp.c (af_warper_compute_line_best): Remove shadowing variable declarations. Fix warning parameters and replace printf with AF_LOG. (af_warper_compute): Remove unused variable.
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
diff --git a/ChangeLog b/ChangeLog
index 10e217b..a8a277b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,14 @@
* src/autofit/rules.mk (AUTOF_DRV_SRC): Add afwarp.c.
+ * src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up
+ to avoid compiler warnings.
+
+ * src/autofit/afwarp.c (af_warper_compute_line_best): Remove
+ shadowing variable declarations.
+ Fix warning parameters and replace printf with AF_LOG.
+ (af_warper_compute): Remove unused variable.
+
2006-01-20 David Turner <david@freetype.org>
Adding experimental implementation of `warp hinting' (new hinting
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index a24070e..87b5e54 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -184,6 +184,7 @@
/* we now need to hint the metrics according to the change in */
/* width/positioning that occured during the hinting process */
{
+#ifndef AF_USE_WARPER
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
FT_Pos pp1x_uh, pp2x_uh;
AF_AxisHints axis = &hints->axis[AF_DIMENSION_HORZ];
@@ -191,7 +192,7 @@
AF_Edge edge2 = edge1 +
axis->num_edges - 1; /* rightmost edge */
-#ifndef AF_USE_WARPER
+
if ( axis->num_edges > 1 )
{
old_advance = loader->pp2.x;
diff --git a/src/autofit/afwarp.c b/src/autofit/afwarp.c
index 24129d8..ac39942 100644
--- a/src/autofit/afwarp.c
+++ b/src/autofit/afwarp.c
@@ -52,7 +52,7 @@
AF_Segment segments,
FT_UInt num_segments )
{
- FT_Int idx_min, idx_max, idx0, xx1min, xx1max;
+ FT_Int idx_min, idx_max, idx0;
FT_UInt nn;
AF_WarpScore scores[64];
@@ -81,11 +81,12 @@
if ( idx_min > idx_max )
{
- printf( "invalid indices:\n"
- " min=%d max=%d, xx1=%d xx2=%d,\n"
- " x1min=%d x1max=%d, x2min=%d x2max=%d\n",
- idx_min, idx_max, xx1, xx2,
- warper->x1min, warper->x1max, warper->x2min, warper->x2max );
+ AF_LOG(( "invalid indices:\n"
+ " min=%d max=%d, xx1=%ld xx2=%ld,\n"
+ " x1min=%ld x1max=%ld, x2min=%ld x2max=%ld\n",
+ idx_min, idx_max, xx1, xx2,
+ warper->x1min, warper->x1max,
+ warper->x2min, warper->x2max ));
return;
}
}
@@ -252,7 +253,6 @@
for ( w = warper->wmin; w <= warper->wmax; w++ )
{
- FT_Int line = w - warper->wmin;
FT_Fixed new_scale;
FT_Pos new_delta;
FT_Pos xx1, xx2;