More FT_ZERO usage.

* src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
s/ft_memset/FT_MEM_ZERO/.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings):
s/ft_memset/FT_ARRAY_ZERO/.

* src/raster/ftraster.c (FT_ZERO): Define.
(ft_black_new): Use it.
* src/raster/ftrend1.c (ft_raster1_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.

* src/smooth/ftgrays.c (FT_ZERO): Define.
(gray_raster_new): Use it.
* src/smooth/ftsmooth.c (ft_smooth_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
This commit is contained in:
Werner Lemberg 2016-09-28 19:10:52 +02:00
parent 2ecf89b481
commit 45cad2e5e1
7 changed files with 34 additions and 8 deletions

View File

@ -1,3 +1,23 @@
2016-09-28 Werner Lemberg <wl@gnu.org>
More FT_ZERO usage.
* src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
s/ft_memset/FT_MEM_ZERO/.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings):
s/ft_memset/FT_ARRAY_ZERO/.
* src/raster/ftraster.c (FT_ZERO): Define.
(ft_black_new): Use it.
* src/raster/ftrend1.c (ft_raster1_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
* src/smooth/ftgrays.c (FT_ZERO): Define.
(gray_raster_new): Use it.
* src/smooth/ftsmooth.c (ft_smooth_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
2016-09-28 Werner Lemberg <wl@gnu.org>
*/*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.

View File

@ -972,7 +972,7 @@
FT_UShort i;
ft_memset( nGlyphInClass, 0, 256 );
FT_MEM_ZERO( nGlyphInClass, 256 );
for ( i = 0; i < nGlyphs; i++ )

View File

@ -405,9 +405,7 @@
( decoder->buildchar == NULL ) );
if ( decoder->buildchar && decoder->len_buildchar > 0 )
ft_memset( &decoder->buildchar[0],
0,
sizeof ( decoder->buildchar[0] ) * decoder->len_buildchar );
FT_ARRAY_ZERO( decoder->buildchar, decoder->len_buildchar );
FT_TRACE4(( "\n"
"Start charstring\n" ));

View File

@ -249,6 +249,10 @@
#ifndef FT_MEM_ZERO
#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count )
#endif
#ifndef FT_ZERO
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
#endif
/* FMulDiv means `Fast MulDiv'; it is used in case where `b' is */
@ -3057,7 +3061,7 @@
*araster = (FT_Raster)&the_raster;
FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
FT_ZERO( &the_raster );
ft_black_init( &the_raster );
return 0;

View File

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

View File

@ -284,6 +284,10 @@ typedef ptrdiff_t FT_PtrDist;
#ifndef FT_MEM_ZERO
#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count )
#endif
#ifndef FT_ZERO
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
#endif
/* as usual, for the speed hungry :-) */
@ -1966,7 +1970,7 @@ typedef ptrdiff_t FT_PtrDist;
*araster = (FT_Raster)&the_raster;
FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
FT_ZERO( &the_raster );
return 0;
}

View File

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