* src/cache/ftccache.c (ftc_cache_lookup),

src/cache/ftccmap.c (ftc_cmap_family_init),
src/cache/ftcmanag.c (ftc_family_table_alloc),
src/cache/ftcsbits.c (FTC_SBit_Cache_Lookup): Use FTC_Err_*.
src/cache/ftcimage.c (FTC_Image_Cache_Lookup): Use FTC_Err_*.
(FTC_ImageCache_Lookup): Fix handling of invalid arguments.
This commit is contained in:
Werner Lemberg 2002-04-28 02:48:20 +00:00
parent e788049931
commit 7b3dc7bb61
6 changed files with 18 additions and 12 deletions

View File

@ -1,3 +1,12 @@
2002-04-28 Werner Lemberg <wl@gnu.org>
* src/cache/ftccache.c (ftc_cache_lookup),
src/cache/ftccmap.c (ftc_cmap_family_init),
src/cache/ftcmanag.c (ftc_family_table_alloc),
src/cache/ftcsbits.c (FTC_SBit_Cache_Lookup): Use FTC_Err_*.
src/cache/ftcimage.c (FTC_Image_Cache_Lookup): Use FTC_Err_*.
(FTC_ImageCache_Lookup): Fix handling of invalid arguments.
2002-04-22 Werner Lemberg <wl@gnu.org>
* builds/unix/configure.ac: Set `version_info' to 9:1:3 (FT2

View File

@ -512,7 +512,6 @@
FT_LruNode lru;
/* some argument checks are delayed to ftc_glyph_cache_lookup */
if ( !cache || !query || !anode )
return FTC_Err_Invalid_Argument;
@ -534,7 +533,7 @@
{
FT_ERROR((
"ftc_cache_lookup: invalid query (bad 'family' field)\n" ));
return FT_Err_Invalid_Argument;
return FTC_Err_Invalid_Argument;
}
if ( *bucket )

4
src/cache/ftccmap.c vendored
View File

@ -32,7 +32,7 @@
/* codes to equivalent glyph indices. */
/* */
/* For now, the implementation is very basic: Each node maps a range of */
/* 128 consecutive character codes to their correspondingglyph indices. */
/* 128 consecutive character codes to their corresponding glyph indices. */
/* */
/* We could do more complex things, but I don't think it is really very */
/* useful. */
@ -228,7 +228,7 @@
Bad_Descriptor:
FT_ERROR(( "ftp_cmap_family_init: invalid charmap descriptor\n" ));
return FT_Err_Invalid_Argument;
return FTC_Err_Invalid_Argument;
}

10
src/cache/ftcimage.c vendored
View File

@ -324,11 +324,9 @@
FT_Error error;
/* some argument checks are delayed to ftc_glyph_cache_lookup */
if ( aglyph )
*aglyph = NULL;
*aglyph = NULL;
/* some argument checks are delayed to ftc_cache_lookup */
if ( !aglyph )
return FTC_Err_Invalid_Argument;
if ( anode )
*anode = NULL;
@ -374,7 +372,7 @@
if ( !desc )
return FT_Err_Invalid_Argument;
return FTC_Err_Invalid_Argument;
desc0.font = desc->font;
desc0.type = (FT_UInt32)desc->image_type;

View File

@ -400,7 +400,7 @@
else
{
FT_ERROR(( "ftc_family_table_alloc: internal bug!" ));
return FT_Err_Invalid_Argument;
return FTC_Err_Invalid_Argument;
}
entry->link = FTC_FAMILY_ENTRY_NONE;

View File

@ -516,7 +516,7 @@
if ( !desc )
return FT_Err_Invalid_Argument;
return FTC_Err_Invalid_Argument;
desc0.font = desc->font;
desc0.type = (FT_UInt32)desc->image_type;