ref: 7b3dc7bb61a786b08e6ac2e12b4a5fa3a312c055
parent: e7880499312da5f83c237c49023441e9aa62d959
author: Werner Lemberg <[email protected]>
date: Sat Apr 27 22:48:20 EDT 2002
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-28 Werner Lemberg <[email protected]>
+
+ * 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 <[email protected]>
* builds/unix/configure.ac: Set `version_info' to 9:1:3 (FT2
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -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 )
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -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;
}
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -324,12 +324,10 @@
FT_Error error;
- /* some argument checks are delayed to ftc_glyph_cache_lookup */
- if ( aglyph )
- *aglyph = NULL;
+ /* some argument checks are delayed to ftc_cache_lookup */
+ if ( !aglyph )
+ return FTC_Err_Invalid_Argument;
- *aglyph = NULL;
-
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;
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -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;
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -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;