* src/cff/cffgload.h (CFF_Builder): Remove `error'

* src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace
`Memory_Error' with `Fail' und update all users.
This commit is contained in:
Werner Lemberg 2004-05-13 21:59:17 +00:00
parent efd4e87778
commit f258627e83
3 changed files with 28 additions and 28 deletions

View File

@ -1,3 +1,9 @@
2004-05-12 Werner Lemberg <wl@gnu.org>
* src/cff/cffgload.h (CFF_Builder): Remove `error'
* src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace
`Memory_Error' with `Fail' und update all users.
2004-05-11 Werner Lemberg <wl@gnu.org>
* include/freetype/internal/psaux.h (T1_ParseState): New

View File

@ -825,7 +825,7 @@
zone = decoder->zones;
stack = decoder->top;
hinter = (T2_Hints_Funcs) builder->hints_funcs;
hinter = (T2_Hints_Funcs)builder->hints_funcs;
builder->path_begun = 0;
@ -842,7 +842,7 @@
if ( hinter )
hinter->open( hinter->hints );
/* now, execute loop */
/* now execute loop */
while ( ip < limit )
{
CFF_Operator op;
@ -1266,7 +1266,7 @@
if ( cff_builder_start_point ( builder, x, y ) ||
check_points( builder, num_args / 2 ) )
goto Memory_Error;
goto Fail;
if ( num_args < 2 || num_args & 1 )
goto Stack_Underflow;
@ -1291,9 +1291,9 @@
FT_TRACE4(( op == cff_op_hlineto ? " hlineto"
: " vlineto" ));
if ( cff_builder_start_point ( builder, x, y ) ||
check_points( builder, num_args ) )
goto Memory_Error;
if ( cff_builder_start_point ( builder, x, y ) ||
check_points( builder, num_args ) )
goto Fail;
args = stack;
while (args < decoder->top )
@ -1304,7 +1304,7 @@
y += args[0];
if ( cff_builder_add_point1( builder, x, y ) )
goto Memory_Error;
goto Fail;
args++;
phase ^= 1;
@ -1322,7 +1322,7 @@
if ( cff_builder_start_point ( builder, x, y ) ||
check_points( builder, num_args / 2 ) )
goto Memory_Error;
goto Fail;
args = stack;
while ( args < decoder->top )
@ -1345,7 +1345,7 @@
FT_TRACE4(( " vvcurveto" ));
if ( cff_builder_start_point( builder, x, y ) )
goto Memory_Error;
goto Fail;
args = stack;
if ( num_args & 1 )
@ -1359,7 +1359,7 @@
goto Stack_Underflow;
if ( check_points( builder, 3 * ( num_args / 4 ) ) )
goto Memory_Error;
goto Fail;
while ( args < decoder->top )
{
@ -1379,7 +1379,7 @@
FT_TRACE4(( " hhcurveto" ));
if ( cff_builder_start_point( builder, x, y ) )
goto Memory_Error;
goto Fail;
args = stack;
if ( num_args & 1 )
@ -1393,7 +1393,7 @@
goto Stack_Underflow;
if ( check_points( builder, 3 * ( num_args / 4 ) ) )
goto Memory_Error;
goto Fail;
while ( args < decoder->top )
{
@ -1419,7 +1419,7 @@
: " hvcurveto" ));
if ( cff_builder_start_point( builder, x, y ) )
goto Memory_Error;
goto Fail;
args = stack;
if (num_args < 4 || ( num_args % 4 ) > 1 )
@ -1476,7 +1476,7 @@
if ( cff_builder_start_point( builder, x, y ) ||
check_points( builder, num_lines + 3 ) )
goto Memory_Error;
goto Fail;
args = stack;
@ -1516,7 +1516,7 @@
if ( cff_builder_start_point ( builder, x, y ) ||
check_points( builder, num_curves*3 + 2 ) )
goto Memory_Error;
goto Fail;
args = stack;
@ -1555,10 +1555,10 @@
/* adding five more points; 4 control points, 1 on-curve point */
/* make sure we have enough space for the start point if it */
/* needs to be added.. */
/* needs to be added */
if ( cff_builder_start_point( builder, x, y ) ||
check_points( builder, 6 ) )
goto Memory_Error;
goto Fail;
/* Record the starting point's y postion for later use */
start_y = y;
@ -1609,7 +1609,7 @@
/* adding six more points; 4 control points, 2 on-curve points */
if ( cff_builder_start_point( builder, x, y ) ||
check_points( builder, 6 ) )
goto Memory_Error;
goto Fail;
/* record the starting point's y-position for later use */
start_y = y;
@ -1661,7 +1661,7 @@
/* adding six more points; 4 control points, 2 on-curve points */
if ( cff_builder_start_point( builder, x, y ) ||
check_points( builder, 6 ) )
goto Memory_Error;
goto Fail;
/* record the starting point's x, y postion for later use */
start_x = x;
@ -1724,7 +1724,7 @@
if ( cff_builder_start_point( builder, x, y ) ||
check_points( builder, 6 ) )
goto Memory_Error;
goto Fail;
args = stack;
for ( count = 6; count > 0; count-- )
@ -2175,6 +2175,7 @@
FT_TRACE4(( "..end..\n\n" ));
Fail:
return error;
Syntax_Error:
@ -2188,9 +2189,6 @@
Stack_Overflow:
FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow!" ));
return CFF_Err_Stack_Overflow;
Memory_Error:
return builder->error;
}

View File

@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003 by */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -75,9 +75,6 @@ FT_BEGIN_HEADER
/* */
/* no_recurse :: Set but not used. */
/* */
/* error :: An error code that is only used to report memory */
/* allocation problems. */
/* */
/* metrics_only :: A boolean indicating that we only want to compute */
/* the metrics of a given glyph, not load all of its */
/* points. */
@ -111,7 +108,6 @@ FT_BEGIN_HEADER
FT_Bool load_points;
FT_Bool no_recurse;
FT_Error error; /* only used for memory errors */
FT_Bool metrics_only;
void* hints_funcs; /* hinter-specific */