* 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.
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
diff --git a/ChangeLog b/ChangeLog
index 4cffb9a..02b6ac5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 3df1cf7..934dcb0 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -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;
}
diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h
index 3adfe7c..89ae049 100644
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -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 */