ref: 2ecf89b481703315bffa8e0b10c2e970224b52e6
parent: a3e2c8323494b55f3c78781616a0a52c814d8460
author: Werner Lemberg <[email protected]>
date: Wed Sep 28 15:06:21 EDT 2016
*/*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-09-28 Werner Lemberg <[email protected]>
+
+ */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
+
2016-09-27 Werner Lemberg <[email protected]>
[truetype] Trace number of executed opcodes.
--- 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;
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -439,7 +439,7 @@
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 );
--- 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++;
}
--- 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;
--- 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 );
--- 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;
--- 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++ )
--- 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;
--- 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 );
}
--- 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;
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1290,7 +1290,7 @@
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 */
--- 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 */
{
--- 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;
--- 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;
--- 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
--- 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;
}
--- 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 ) ||
--- 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 );
}
--- 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;