s/ft_memset/FT_MEM_SET/.

s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
This commit is contained in:
Werner Lemberg 2002-07-28 05:05:24 +00:00
parent bdb10748a7
commit b3d5e9cf03
27 changed files with 49 additions and 45 deletions

View File

@ -1,3 +1,8 @@
2002-07-28 Werner Lemberg <wl@gnu.org>
s/ft_memset/FT_MEM_SET/.
s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
2002-07-27 Werner Lemberg <wl@gnu.org>
* src/sfnt/ttload.c (sfnt_dir_check): Make it work with TTCs.

View File

@ -1115,7 +1115,7 @@
edge_limit++;
/* clear all edge fields */
FT_MEM_SET( edge, 0, sizeof ( *edge ) );
FT_MEM_ZERO( edge, sizeof ( *edge ) );
/* add the segment to the new edge's list */
edge->first = seg;

View File

@ -814,7 +814,7 @@
FT_Error error;
FT_MEM_SET( optimizer, 0, sizeof ( *optimizer ) );
FT_MEM_ZERO( optimizer, sizeof ( *optimizer ) );
optimizer->outline = outline;
optimizer->memory = memory;

View File

@ -202,7 +202,7 @@
if ( new_buckets == NULL )
return;
FT_MEM_SET( new_buckets, 0, sizeof ( FT_MemNode ) * new_size );
FT_MEM_ZERO( new_buckets, sizeof ( FT_MemNode ) * new_size );
for ( i = 0; i < table->size; i++ )
{
@ -243,7 +243,7 @@
if ( table == NULL )
goto Exit;
FT_MEM_SET( table, 0, sizeof ( *table ) );
FT_MEM_ZERO( table, sizeof ( *table ) );
table->size = FT_MEM_SIZE_MIN;
table->nodes = 0;
@ -260,7 +260,7 @@
memory->alloc( memory,
table->size * sizeof ( FT_MemNode ) );
if ( table->buckets )
FT_MEM_SET( table->buckets, 0, sizeof ( FT_MemNode ) * table->size );
FT_MEM_ZERO( table->buckets, sizeof ( FT_MemNode ) * table->size );
else
{
memory->free( memory, table );

View File

@ -599,7 +599,7 @@
if ( !clazz || !clazz->glyph_prepare )
goto Bad;
FT_MEM_SET( &dummy, 0, sizeof ( dummy ) );
FT_MEM_ZERO( &dummy, sizeof ( dummy ) );
dummy.library = glyph->library;
dummy.format = clazz->glyph_format;

View File

@ -211,9 +211,9 @@
}
/* clear all public fields in the glyph slot */
FT_MEM_SET( &slot->metrics, 0, sizeof ( slot->metrics ) );
FT_MEM_SET( &slot->outline, 0, sizeof ( slot->outline ) );
FT_MEM_SET( &slot->bitmap, 0, sizeof ( slot->bitmap ) );
FT_MEM_ZERO( &slot->metrics, sizeof ( slot->metrics ) );
FT_MEM_ZERO( &slot->outline, sizeof ( slot->outline ) );
FT_MEM_ZERO( &slot->bitmap, sizeof ( slot->bitmap ) );
slot->bitmap_left = 0;
slot->bitmap_top = 0;

View File

@ -64,7 +64,7 @@
return FT_Err_Out_Of_Memory;
}
FT_MEM_SET( *P, 0, size );
FT_MEM_ZERO( *P, size );
}
else
*P = NULL;
@ -106,7 +106,7 @@
goto Fail;
if ( size > current )
FT_MEM_SET( (char*)Q + current, 0, size - current );
FT_MEM_ZERO( (char*)Q + current, size - current );
*P = Q;
return FT_Err_Ok;

View File

@ -224,7 +224,7 @@
if ( FT_NEW_ARRAY( ht->table, ht->size ) )
goto Exit;
FT_MEM_SET( ht->table, 0, sizeof ( hashnode ) * ht->size );
FT_MEM_ZERO( ht->table, sizeof ( hashnode ) * ht->size );
for ( i = 0, bp = obp; i < sz; i++, bp++ )
{
@ -255,7 +255,7 @@
if ( FT_NEW_ARRAY( ht->table, sz ) )
goto Exit;
FT_MEM_SET( ht->table, 0, sizeof ( hashnode ) * sz );
FT_MEM_ZERO( ht->table, sizeof ( hashnode ) * sz );
Exit:
return error;
@ -427,7 +427,7 @@
}
/* Prepare the separator bitmap. */
FT_MEM_SET( seps, 0, 32 );
FT_MEM_ZERO( seps, 32 );
/* If the very last character of the separator string is a plus, then */
/* set the `mult' flag to indicate that multiple separators should be */
@ -993,7 +993,7 @@
}
p = font->user_props + font->nuser_props;
FT_MEM_SET( p, 0, sizeof ( bdf_property_t ) );
FT_MEM_ZERO( p, sizeof ( bdf_property_t ) );
n = (unsigned long)( ft_strlen( name ) + 1 );
if ( FT_NEW_ARRAY( p->name, n ) )
@ -1341,7 +1341,7 @@
}
fp = font->props + font->props_size;
FT_MEM_SET( fp, 0, sizeof ( bdf_property_t ) );
FT_MEM_ZERO( fp, sizeof ( bdf_property_t ) );
font->props_size++;
}
@ -1599,9 +1599,8 @@
font->glyphs_size,
font->glyphs_size + 64 ) )
goto Exit;
FT_MEM_SET( font->glyphs + font->glyphs_size,
0,
sizeof ( bdf_glyph_t ) * 64 ); /* FZ inutile */
FT_MEM_ZERO( font->glyphs + font->glyphs_size,
sizeof ( bdf_glyph_t ) * 64 ); /* FZ inutile */
font->glyphs_size += 64;
}
@ -2209,7 +2208,7 @@
FT_Error error = BDF_Err_Ok;
FT_MEM_SET( &p, 0, sizeof ( _bdf_parse_t ) );
FT_MEM_ZERO( &p, sizeof ( _bdf_parse_t ) );
p.opts = (bdf_options_t*)( ( opts != 0 ) ? opts : &_bdf_opts );
p.minlb = 32767;

View File

@ -357,7 +357,7 @@
/* clear everything */
FT_MEM_SET( decoder, 0, sizeof ( *decoder ) );
FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
/* initialize builder */
cff_builder_init( &decoder->builder, face, size, slot, hinting );

View File

@ -1091,7 +1091,7 @@
FT_UShort count;
FT_MEM_SET( idx, 0, sizeof ( *idx ) );
FT_MEM_ZERO( idx, sizeof ( *idx ) );
idx->stream = stream;
if ( !FT_READ_USHORT( count ) &&
@ -1167,7 +1167,7 @@
FT_FRAME_RELEASE( idx->bytes );
FT_FREE( idx->offsets );
FT_MEM_SET( idx, 0, sizeof ( *idx ) );
FT_MEM_ZERO( idx, sizeof ( *idx ) );
}
}
@ -1941,7 +1941,7 @@
cff_parser_init( &parser, CFF_CODE_TOPDICT, &font->font_dict );
/* set defaults */
FT_MEM_SET( top, 0, sizeof ( *top ) );
FT_MEM_ZERO( top, sizeof ( *top ) );
top->underline_position = -100;
top->underline_thickness = 50;
@ -1966,7 +1966,7 @@
if ( top->private_offset && top->private_size )
{
/* set defaults */
FT_MEM_SET( priv, 0, sizeof ( *priv ) );
FT_MEM_ZERO( priv, sizeof ( *priv ) );
priv->blue_shift = 7;
priv->blue_fuzz = 1;

View File

@ -112,7 +112,7 @@
FT_UInt n, count;
FT_MEM_SET( &priv, 0, sizeof ( priv ) );
FT_MEM_ZERO( &priv, sizeof ( priv ) );
count = priv.num_blue_values = cpriv->num_blue_values;
for ( n = 0; n < count; n++ )

View File

@ -68,7 +68,7 @@
FT_UInt code,
void* object )
{
FT_MEM_SET( parser, 0, sizeof ( *parser ) );
FT_MEM_ZERO( parser, sizeof ( *parser ) );
parser->top = parser->stack;
parser->object_code = code;

View File

@ -497,7 +497,7 @@
{
FT_UNUSED( face );
FT_MEM_SET( loader, 0, sizeof ( *loader ) );
FT_MEM_ZERO( loader, sizeof ( *loader ) );
}

View File

@ -60,7 +60,7 @@
FT_Int buff_len;
FT_MEM_SET( parser, 0, sizeof ( *parser ) );
FT_MEM_ZERO( parser, sizeof ( *parser ) );
psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );
parser->stream = stream;

View File

@ -1124,7 +1124,7 @@
FT_Bool hinting,
T1_Decoder_Callback parse_callback )
{
FT_MEM_SET( decoder, 0, sizeof ( *decoder ) );
FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
/* retrieve PSNames interface from list of current modules */
{

View File

@ -760,7 +760,7 @@
/* initialize hints table */
ft_memset( &hints, 0, sizeof ( hints ) );
FT_MEM_ZERO( &hints, sizeof ( hints ) );
error = psh1_hint_table_init( &hints,
&dim->hints,
&dim->masks,

View File

@ -861,7 +861,7 @@
/* clear all fields */
ft_memset( glyph, 0, sizeof ( *glyph ) );
FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
memory = globals->memory;

View File

@ -753,7 +753,7 @@
/* clear all fields */
ft_memset( glyph, 0, sizeof ( *glyph ) );
FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
memory = globals->memory;

View File

@ -797,7 +797,7 @@
ps_hints_init( PS_Hints hints,
FT_Memory memory )
{
ft_memset( hints, 0, sizeof ( *hints ) );
FT_MEM_ZERO( hints, sizeof ( *hints ) );
hints->memory = memory;
return 0;
}
@ -1132,7 +1132,7 @@
FT_LOCAL_DEF( void )
t1_hints_funcs_init( T1_Hints_FuncsRec* funcs )
{
ft_memset( (char*)funcs, 0, sizeof ( *funcs ) );
FT_MEM_ZERO( (char*)funcs, sizeof ( *funcs ) );
funcs->open = (T1_Hints_OpenFunc) t1_hints_open;
funcs->close = (T1_Hints_CloseFunc) ps_hints_close;
@ -1197,7 +1197,7 @@
FT_LOCAL_DEF( void )
t2_hints_funcs_init( T2_Hints_FuncsRec* funcs )
{
ft_memset( funcs, 0, sizeof ( *funcs ) );
FT_MEM_ZERO( funcs, sizeof ( *funcs ) );
funcs->open = (T2_Hints_OpenFunc) t2_hints_open;
funcs->close = (T2_Hints_CloseFunc) ps_hints_close;

View File

@ -3146,7 +3146,7 @@
*araster = &the_raster;
FT_MEM_SET( &the_raster, sizeof ( the_raster ), 0 );
FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
ft_black_init( &the_raster );
return 0;

View File

@ -86,7 +86,7 @@
FT_GlyphSlot slot,
FT_BBox* cbox )
{
FT_MEM_SET( cbox, 0, sizeof ( *cbox ) );
FT_MEM_ZERO( cbox, sizeof ( *cbox ) );
if ( slot->format == render->glyph_format )
FT_Outline_Get_CBox( &slot->outline, cbox );

View File

@ -2062,7 +2062,7 @@
*araster = (FT_Raster)&the_raster;
FT_MEM_SET( &the_raster, 0, sizeof ( the_raster ) );
FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
#ifdef GRAYS_USE_GAMMA
grays_init_gamma( (PRaster)*araster );

View File

@ -85,7 +85,7 @@
FT_GlyphSlot slot,
FT_BBox* cbox )
{
FT_MEM_SET( cbox, 0, sizeof ( *cbox ) );
FT_MEM_ZERO( cbox, sizeof ( *cbox ) );
if ( slot->format == render->glyph_format )
FT_Outline_Get_CBox( &slot->outline, cbox );

View File

@ -854,7 +854,7 @@
offset = 0;
count = data.length;
ft_memset( &inc_stream, 0, sizeof ( inc_stream ) );
FT_MEM_ZERO( &inc_stream, sizeof ( inc_stream ) );
FT_Stream_OpenMemory( &inc_stream, data.pointer, data.length );
loader->stream = &inc_stream;
}
@ -1608,7 +1608,7 @@
}
}
FT_MEM_SET( &loader, 0, sizeof ( loader ) );
FT_MEM_ZERO( &loader, sizeof ( loader ) );
/* update the glyph zone bounds */
{

View File

@ -114,7 +114,7 @@
if ( maxPoints > 0 )
maxPoints += 2;
FT_MEM_SET( zone, 0, sizeof ( *zone ) );
FT_MEM_ZERO( zone, sizeof ( *zone ) );
zone->memory = memory;
if ( FT_NEW_ARRAY( zone->org, maxPoints * 2 ) ||

View File

@ -1626,7 +1626,7 @@
{
FT_UNUSED( face );
FT_MEM_SET( loader, 0, sizeof ( *loader ) );
FT_MEM_ZERO( loader, sizeof ( *loader ) );
loader->num_glyphs = 0;
loader->num_chars = 0;

View File

@ -964,7 +964,7 @@
{
FT_UNUSED( face );
FT_MEM_SET( loader, 0, sizeof ( *loader ) );
FT_MEM_ZERO( loader, sizeof ( *loader ) );
loader->num_glyphs = 0;
loader->num_chars = 0;