* 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
diff --git a/ChangeLog b/ChangeLog
index 3efb044..a161679 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index e55dcb7..3a3ef5b 100644
--- 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 )
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 7dfabc2..6b774ad 100644
--- 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;
}
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 86ecd09..101db85 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -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;
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 2711540..7cdb8f9 100644
--- 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;
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 82ab84c..5b03c20 100644
--- 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;