From 4303677c2d762d46495654902047c8ed38cc9cd9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 17 May 2005 20:35:23 +0000 Subject: [PATCH] * builds/win32/visualc/freetype.vcproj: Updated. Exclude debug info for `Release' versions to reduce library size. * src/base/ftobjs.c (FT_Open_Face): Make it work as documented, this is, ignore `aface' completely if face_index < 0. Reported by David Osborn . * include/freetype/ftimage.h (FT_Outline_MoveToFunc, FT_Outline_LineTo_Func, FT_Outline_ConicToFunc, FT_Outline_CubicToFunc), src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic, gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to, gray_render_span, gray_sweep): Decorate parameters with `const' where appropriate. --- builds/win32/visualc/freetype.vcproj | 1475 +++++++++++++------------- include/freetype/freetype.h | 4 +- include/freetype/ftimage.h | 22 +- src/base/ftobjs.c | 7 +- src/otvalid/otvcommn.h | 30 +- src/raster/ftraster.c | 12 +- src/smooth/ftgrays.c | 46 +- 7 files changed, 776 insertions(+), 820 deletions(-) diff --git a/builds/win32/visualc/freetype.vcproj b/builds/win32/visualc/freetype.vcproj index 7e4c58f06..0a90d1ef4 100644 --- a/builds/win32/visualc/freetype.vcproj +++ b/builds/win32/visualc/freetype.vcproj @@ -35,7 +35,7 @@ ObjectFile=".\..\..\..\objs\release/" ProgramDataBaseFileName=".\..\..\..\objs\release/" WarningLevel="4" - DebugInformationFormat="3" + DebugInformationFormat="0" CompileAs="0"/> @@ -88,7 +88,7 @@ ObjectFile=".\..\..\..\objs\release_mt/" ProgramDataBaseFileName=".\..\..\..\objs\release_mt/" WarningLevel="4" - DebugInformationFormat="3" + DebugInformationFormat="0" CompileAs="0"/> @@ -141,7 +141,7 @@ ObjectFile=".\..\..\..\objs\release_st/" ProgramDataBaseFileName=".\..\..\..\objs\release_st/" WarningLevel="4" - DebugInformationFormat="3" + DebugInformationFormat="0" CompileAs="0"/> @@ -285,6 +285,7 @@ ImproveFloatingPointConsistency="TRUE" AdditionalIncludeDirectories="..\..\..\include" PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE" + GeneratePreprocessedFile="0" BasicRuntimeChecks="3" RuntimeLibrary="1" DisableLanguageExtensions="TRUE" @@ -332,60 +333,6 @@ - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + RelativePath="..\..\..\src\lzw\ftlzw.c"> - - - - - - - - - - - - - - - - - - + RelativePath="..\..\..\src\base\ftstroke.c"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + RelativePath="..\..\..\src\base\ftsystem.c"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = 0 ) || !args ) return FT_Err_Invalid_Argument; - *aface = 0; - external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) && args->stream ); @@ -1720,7 +1718,8 @@ internal->transform_delta.y = 0; } - *aface = face; + if ( aface ) + *aface = face; goto Exit; Fail: diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h index 4c78d3f14..9f84910d5 100644 --- a/src/otvalid/otvcommn.h +++ b/src/otvalid/otvcommn.h @@ -339,16 +339,16 @@ FT_BEGIN_HEADER /*************************************************************************/ #define ChainPosClassSet otv_x_Ox, "ChainPosClassSet" -#define ChainPosRuleSet otv_x_Ox, "ChainPosRuleSet" +#define ChainPosRuleSet otv_x_Ox, "ChainPosRuleSet" #define ChainSubClassSet otv_x_Ox, "ChainSubClassSet" #define ChainSubRuleSet otv_x_Ox, "ChainSubRuleSet" #define JstfLangSys otv_x_Ox, "JstfLangSys" -#define JstfMax otv_x_Ox, "JstfMax" +#define JstfMax otv_x_Ox, "JstfMax" #define LigGlyph otv_x_Ox, "LigGlyph" #define LigatureArray otv_x_Ox, "LigatureArray" #define LigatureSet otv_x_Ox, "LigatureSet" #define PosClassSet otv_x_Ox, "PosClassSet" -#define PosRuleSet otv_x_Ox, "PosRuleSet" +#define PosRuleSet otv_x_Ox, "PosRuleSet" #define SubClassSet otv_x_Ox, "SubClassSet" #define SubRuleSet otv_x_Ox, "SubRuleSet" @@ -356,24 +356,24 @@ FT_BEGIN_HEADER otv_x_Ox ( FT_Bytes table, OTV_Validator valid ); -#define AlternateSubstFormat1 otv_u_C_x_Ox, "AlternateSubstFormat1" -#define ChainContextPosFormat1 otv_u_C_x_Ox, "ChainContextPosFormat1" -#define ChainContextSubstFormat1 otv_u_C_x_Ox, "ChainContextSubstFormat1" -#define ContextPosFormat1 otv_u_C_x_Ox, "ContextPosFormat1" -#define ContextSubstFormat1 otv_u_C_x_Ox, "ContextSubstFormat1" -#define LigatureSubstFormat1 otv_u_C_x_Ox, "LigatureSubstFormat1" -#define MultipleSubstFormat1 otv_u_C_x_Ox, "MultipleSubstFormat1" +#define AlternateSubstFormat1 otv_u_C_x_Ox, "AlternateSubstFormat1" +#define ChainContextPosFormat1 otv_u_C_x_Ox, "ChainContextPosFormat1" +#define ChainContextSubstFormat1 otv_u_C_x_Ox, "ChainContextSubstFormat1" +#define ContextPosFormat1 otv_u_C_x_Ox, "ContextPosFormat1" +#define ContextSubstFormat1 otv_u_C_x_Ox, "ContextSubstFormat1" +#define LigatureSubstFormat1 otv_u_C_x_Ox, "LigatureSubstFormat1" +#define MultipleSubstFormat1 otv_u_C_x_Ox, "MultipleSubstFormat1" FT_LOCAL( void ) otv_u_C_x_Ox( FT_Bytes table, OTV_Validator valid ); -#define AlternateSet otv_x_ux, "AlternateSet" -#define AttachPoint otv_x_ux, "AttachPoint" -#define ExtenderGlyph otv_x_ux, "ExtenderGlyph" +#define AlternateSet otv_x_ux, "AlternateSet" +#define AttachPoint otv_x_ux, "AttachPoint" +#define ExtenderGlyph otv_x_ux, "ExtenderGlyph" #define JstfGPOSModList otv_x_ux, "JstfGPOSModList" -#define JstfGSUBModList otv_x_ux, "JstfGSUBModList" -#define Sequence otv_x_ux, "Sequence" +#define JstfGSUBModList otv_x_ux, "JstfGSUBModList" +#define Sequence otv_x_ux, "Sequence" FT_LOCAL( void ) otv_x_ux( FT_Bytes table, diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index c0c46a313..cf634d790 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1255,10 +1255,10 @@ /* */ /* */ /* x :: The x-coordinate of the segment's end point (its start point */ - /* is stored in `LastX'). */ + /* is stored in `lastX'). */ /* */ /* y :: The y-coordinate of the segment's end point (its start point */ - /* is stored in `LastY'). */ + /* is stored in `lastY'). */ /* */ /* */ /* SUCCESS on success, FAILURE on render pool overflow or incorrect */ @@ -1349,10 +1349,10 @@ /* cy :: The y-coordinate of the arc's new control point. */ /* */ /* x :: The x-coordinate of the arc's end point (its start point is */ - /* stored in `LastX'). */ + /* stored in `lastX'). */ /* */ /* y :: The y-coordinate of the arc's end point (its start point is */ - /* stored in `LastY'). */ + /* stored in `lastY'). */ /* */ /* */ /* SUCCESS on success, FAILURE on render pool overflow or incorrect */ @@ -1463,10 +1463,10 @@ /* cy2 :: The y-coordinate of the arc's second new control point. */ /* */ /* x :: The x-coordinate of the arc's end point (its start point is */ - /* stored in `LastX'). */ + /* stored in `lastX'). */ /* */ /* y :: The y-coordinate of the arc's end point (its start point is */ - /* stored in `LastY'). */ + /* stored in `lastY'). */ /* */ /* */ /* SUCCESS on success, FAILURE on render pool overflow or incorrect */ diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 6eeabb708..cc4bf4e6d 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -235,7 +235,7 @@ typedef long TPos; /* sub-pixel coordinate */ /* determine the type used to store cell areas. This normally takes at */ - /* least PIXEL_BYTES*2 + 1. On 16-bit systems, we need to use `long' */ + /* least PIXEL_BITS*2 + 1 bits. On 16-bit systems, we need to use `long'*/ /* instead of `int', otherwise bad things happen */ #if PIXEL_BITS <= 7 @@ -457,7 +457,7 @@ } /* record the previous cell if needed (i.e., if we changed the cell */ - /* position, of changed the `invalid' flag) */ + /* position, or changed the `invalid' flag) */ if ( ras.invalid != invalid || record ) gray_record_cell( RAS_VAR ); @@ -782,8 +782,8 @@ static void - gray_render_conic( RAS_ARG_ FT_Vector* control, - FT_Vector* to ) + gray_render_conic( RAS_ARG_ const FT_Vector* control, + const FT_Vector* to ) { TPos dx, dy; int top, level; @@ -917,9 +917,9 @@ static void - gray_render_cubic( RAS_ARG_ FT_Vector* control1, - FT_Vector* control2, - FT_Vector* to ) + gray_render_cubic( RAS_ARG_ const FT_Vector* control1, + const FT_Vector* control2, + const FT_Vector* to ) { TPos dx, dy, da, db; int top, level; @@ -1229,8 +1229,8 @@ static int - gray_move_to( FT_Vector* to, - FT_Raster raster ) + gray_move_to( const FT_Vector* to, + FT_Raster raster ) { TPos x, y; @@ -1251,8 +1251,8 @@ static int - gray_line_to( FT_Vector* to, - FT_Raster raster ) + gray_line_to( const FT_Vector* to, + FT_Raster raster ) { gray_render_line( (PRaster)raster, UPSCALE( to->x ), UPSCALE( to->y ) ); @@ -1261,9 +1261,9 @@ static int - gray_conic_to( FT_Vector* control, - FT_Vector* to, - FT_Raster raster ) + gray_conic_to( const FT_Vector* control, + const FT_Vector* to, + FT_Raster raster ) { gray_render_conic( (PRaster)raster, control, to ); return 0; @@ -1271,10 +1271,10 @@ static int - gray_cubic_to( FT_Vector* control1, - FT_Vector* control2, - FT_Vector* to, - FT_Raster raster ) + gray_cubic_to( const FT_Vector* control1, + const FT_Vector* control2, + const FT_Vector* to, + FT_Raster raster ) { gray_render_cubic( (PRaster)raster, control1, control2, to ); return 0; @@ -1282,10 +1282,10 @@ static void - gray_render_span( int y, - int count, - FT_Span* spans, - PRaster raster ) + gray_render_span( int y, + int count, + const FT_Span* spans, + PRaster raster ) { unsigned char* p; FT_Bitmap* map = &raster->target; @@ -1447,7 +1447,7 @@ static void - gray_sweep( RAS_ARG_ FT_Bitmap* target ) + gray_sweep( RAS_ARG_ const FT_Bitmap* target ) { TCoord x, y, cover; TArea area;