aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/raster/ftraster.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/raster/ftraster.c')
-rw-r--r--freetype/src/raster/ftraster.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/freetype/src/raster/ftraster.c b/freetype/src/raster/ftraster.c
index 912c2310f..bf34d1d58 100644
--- a/freetype/src/raster/ftraster.c
+++ b/freetype/src/raster/ftraster.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1122,13 +1122,13 @@
if ( Dx > 0 )
{
- Ix = ( ras.precision * Dx ) / Dy;
+ Ix = SMulDiv( ras.precision, Dx, Dy);
Rx = ( ras.precision * Dx ) % Dy;
Dx = 1;
}
else
{
- Ix = -( ( ras.precision * -Dx ) / Dy );
+ Ix = SMulDiv( ras.precision, -Dx, Dy) * -1;
Rx = ( ras.precision * -Dx ) % Dy;
Dx = -1;
}
@@ -3400,7 +3400,7 @@
}
-#else /* _STANDALONE_ */
+#else /* !_STANDALONE_ */
static int
@@ -3408,7 +3408,7 @@
PRaster *araster )
{
FT_Error error;
- PRaster raster;
+ PRaster raster = NULL;
*araster = 0;
@@ -3432,7 +3432,7 @@
}
-#endif /* _STANDALONE_ */
+#endif /* !_STANDALONE_ */
static void
@@ -3447,9 +3447,8 @@
PWorker worker = (PWorker)pool_base;
- raster->buffer = pool_base + ( (sizeof ( *worker ) + 7 ) & ~7 );
- raster->buffer_size = ( ( pool_base + pool_size ) -
- (char*)raster->buffer ) / sizeof ( Long );
+ raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 );
+ raster->buffer_size = pool_base + pool_size - (char*)raster->buffer;
raster->worker = worker;
}
else