*/*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
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 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
diff --git a/ChangeLog b/ChangeLog
index bccd2a8..f5a88f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-09-28 Werner Lemberg <wl@gnu.org>
+
+ */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
+
2016-09-27 Werner Lemberg <wl@gnu.org>
[truetype] Trace number of executed opcodes.
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index dd0f025..d336b1c 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -546,8 +546,8 @@
/* we render the glyph into a glyph bitmap using a `dummy' glyph slot */
/* then calling FT_Render_Glyph_Internal() */
- FT_MEM_ZERO( &dummy, sizeof ( dummy ) );
- FT_MEM_ZERO( &dummy_internal, sizeof ( dummy_internal ) );
+ FT_ZERO( &dummy );
+ FT_ZERO( &dummy_internal );
dummy.internal = &dummy_internal;
dummy.library = library;
dummy.format = clazz->glyph_format;
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index e9cb108..6a59e83 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -439,7 +439,7 @@ THE SOFTWARE.
FT_Short resolution_x = 0, resolution_y = 0;
- FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
+ FT_ZERO( bsize );
bsize->height = (FT_Short)( font->font_ascent + font->font_descent );
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index e1dce95..e919136 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1144,7 +1144,7 @@
}
fp = font->props + font->props_size;
- FT_MEM_ZERO( fp, sizeof ( bdf_property_t ) );
+ FT_ZERO( fp );
font->props_size++;
}
diff --git a/src/cff/cf2ft.c b/src/cff/cf2ft.c
index 55f3206..edbe6a7 100644
--- a/src/cff/cf2ft.c
+++ b/src/cff/cf2ft.c
@@ -239,7 +239,7 @@
FT_Memory memory,
FT_Error* error )
{
- FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) );
+ FT_ZERO( outline );
outline->root.memory = memory;
outline->root.error = error;
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 4f375a6..f7ddb3c 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -391,7 +391,7 @@
/* clear everything */
- FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
+ FT_ZERO( decoder );
/* initialize builder */
cff_builder_init( &decoder->builder, face, size, slot, hinting );
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 470fa82..ab683e5 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -232,7 +232,7 @@
FT_UShort count;
- FT_MEM_ZERO( idx, sizeof ( *idx ) );
+ FT_ZERO( idx );
idx->stream = stream;
idx->start = FT_STREAM_POS();
@@ -310,7 +310,7 @@
FT_FRAME_RELEASE( idx->bytes );
FT_FREE( idx->offsets );
- FT_MEM_ZERO( idx, sizeof ( *idx ) );
+ FT_ZERO( idx );
}
}
@@ -1330,7 +1330,7 @@
0 );
/* set defaults */
- FT_MEM_ZERO( top, sizeof ( *top ) );
+ FT_ZERO( top );
top->underline_position = -( 100L << 16 );
top->underline_thickness = 50L << 16;
@@ -1373,7 +1373,7 @@
if ( top->private_offset && top->private_size )
{
/* set defaults */
- FT_MEM_ZERO( priv, sizeof ( *priv ) );
+ FT_ZERO( priv );
priv->blue_shift = 7;
priv->blue_fuzz = 1;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 0f07696..126bbee 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -114,7 +114,7 @@
FT_UInt n, count;
- FT_MEM_ZERO( priv, sizeof ( *priv ) );
+ FT_ZERO( priv );
count = priv->num_blue_values = cpriv->num_blue_values;
for ( n = 0; n < count; n++ )
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index a4f986b..95638b8 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -44,7 +44,7 @@
FT_UShort num_designs,
FT_UShort num_axes )
{
- FT_MEM_ZERO( parser, sizeof ( *parser ) );
+ FT_ZERO( parser );
parser->top = parser->stack;
parser->object_code = code;
@@ -1132,8 +1132,8 @@
charstring_len = (FT_ULong)( p - charstring_base ) + 1;
/* construct CFF_Decoder object */
- FT_MEM_ZERO( &decoder, sizeof ( decoder ) );
- FT_MEM_ZERO( &cff_rec, sizeof ( cff_rec ) );
+ FT_ZERO( &decoder );
+ FT_ZERO( &cff_rec );
cff_rec.top_font.font_dict.num_designs = parser->num_designs;
cff_rec.top_font.font_dict.num_axes = parser->num_axes;
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 21397c2..a0a5c24 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -570,7 +570,7 @@
{
FT_UNUSED( face );
- FT_MEM_ZERO( loader, sizeof ( *loader ) );
+ FT_ZERO( loader );
}
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index cb07c45..8dce7f9 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -65,7 +65,7 @@
FT_Byte *arg1, *arg2;
- FT_MEM_ZERO( parser, sizeof ( *parser ) );
+ FT_ZERO( parser );
psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );
parser->stream = stream;
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index a86b45d..3917a75 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1290,7 +1290,7 @@ THE SOFTWARE.
FT_Short resolution_x = 0, resolution_y = 0;
- FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
+ FT_ZERO( bsize );
/* for simplicity, we take absolute values of integer properties */
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 98f6ce1..493e3bd 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -1591,7 +1591,7 @@
FT_Render_Mode hint_mode,
T1_Decoder_Callback parse_callback )
{
- FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
+ FT_ZERO( decoder );
/* retrieve PSNames interface from list of current modules */
{
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 8f131be..9dabb77 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1162,7 +1162,7 @@
/* clear all fields */
- FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
+ FT_ZERO( glyph );
memory = glyph->memory = globals->memory;
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index d7cc4a0..3aeb265 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -818,7 +818,7 @@
ps_hints_init( PS_Hints hints,
FT_Memory memory )
{
- FT_MEM_ZERO( hints, sizeof ( *hints ) );
+ FT_ZERO( hints );
hints->memory = memory;
}
@@ -1140,7 +1140,7 @@
FT_LOCAL_DEF( void )
t1_hints_funcs_init( T1_Hints_FuncsRec* funcs )
{
- FT_MEM_ZERO( (char*)funcs, sizeof ( *funcs ) );
+ FT_ZERO( funcs );
funcs->open = (T1_Hints_OpenFunc) t1_hints_open;
funcs->close = (T1_Hints_CloseFunc) ps_hints_close;
@@ -1206,7 +1206,7 @@
FT_LOCAL_DEF( void )
t2_hints_funcs_init( T2_Hints_FuncsRec* funcs )
{
- FT_MEM_ZERO( funcs, sizeof ( *funcs ) );
+ FT_ZERO( funcs );
funcs->open = (T2_Hints_OpenFunc) t2_hints_open;
funcs->close = (T2_Hints_CloseFunc) ps_hints_close;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 28a5419..17d3036 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1487,7 +1487,7 @@
offset = 0;
loader->byte_len = glyph_data.length;
- FT_MEM_ZERO( &inc_stream, sizeof ( inc_stream ) );
+ FT_ZERO( &inc_stream );
FT_Stream_OpenMemory( &inc_stream,
glyph_data.pointer,
(FT_ULong)glyph_data.length );
@@ -2252,7 +2252,7 @@
face = (TT_Face)glyph->face;
stream = face->root.stream;
- FT_MEM_ZERO( loader, sizeof ( TT_LoaderRec ) );
+ FT_ZERO( loader );
#ifdef TT_USE_BYTECODE_INTERPRETER
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index a379cf8..2bd3fbc 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -423,7 +423,7 @@
/* In case of multi-threading it can happen that the old size object */
/* no longer exists, thus we must clear all glyph zone references. */
- ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );
+ FT_ZERO( &exec->zp0 );
exec->zp1 = exec->zp0;
exec->zp2 = exec->zp0;
}
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index ed3be2d..3e60b55 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -117,7 +117,7 @@
FT_Error error;
- FT_MEM_ZERO( zone, sizeof ( *zone ) );
+ FT_ZERO( zone );
zone->memory = memory;
if ( FT_NEW_ARRAY( zone->org, maxPoints ) ||
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index e728cf4..aa25919 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -2149,7 +2149,7 @@
{
FT_UNUSED( face );
- FT_MEM_ZERO( loader, sizeof ( *loader ) );
+ FT_ZERO( loader );
}
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index f948916..9e23a51 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -1268,7 +1268,7 @@
{
FT_UNUSED( face );
- FT_MEM_ZERO( loader, sizeof ( *loader ) );
+ FT_ZERO( loader );
loader->num_glyphs = 0;
loader->num_chars = 0;