summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-08-01 00:30:16 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-08-01 00:30:16 +0900
commitd1ee378566e9b6c3fba3f196a781d595447f05af (patch)
tree59000ff5588f4539e76fc1dbaeb5f78a92d0de31
parent7fd7c6f2e91f874f846fb84027ba28d89c6fbf6c (diff)
downloadfreetype2-d1ee378566e9b6c3fba3f196a781d595447f05af.tar.gz
type1: Use size_t variable to pass the string length.
-rw-r--r--ChangeLog17
-rw-r--r--include/freetype/internal/psaux.h2
-rw-r--r--src/psaux/afmparse.c2
-rw-r--r--src/tools/test_afm.c2
-rw-r--r--src/type1/t1afm.c2
5 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7dec4a322..377dae797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ type1: Use size_t variable to pass the string length.
+
+ * psaux.h: The type of `len' (the argument to pass
+ the buffer size to the function in AFM_ParserRec)
+ is changed to size_t, to match with ANSI C string
+ functions.
+
+ * t1afm.c (t1_get_index): Ditto.
+
+ * test_afm.c (dummy_get_index): Ditto.
+
+ * afmparse.c (afm_parser_read_vals): To call
+ AFM_ParserRec.get_index, the length of token
+ `len' is casted to size_t.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
cid: Fix some data types mismatching with their sources.
* src/cid/cidparse.c (cid_parser_new): The types of
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 503eb2b4d..235ba7f56 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -755,7 +755,7 @@ FT_BEGIN_HEADER
FT_Int
(*get_index)( const char* name,
- FT_UInt len,
+ FT_Offset len,
void* user_data );
void* user_data;
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 0f79f72a4..0a0f24927 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -378,7 +378,7 @@
for ( i = 0; i < n; i++ )
{
- FT_UInt len;
+ FT_Offset len;
AFM_Value val = vals + i;
diff --git a/src/tools/test_afm.c b/src/tools/test_afm.c
index d53cb3325..f5f99363c 100644
--- a/src/tools/test_afm.c
+++ b/src/tools/test_afm.c
@@ -63,7 +63,7 @@
int
dummy_get_index( const char* name,
- FT_UInt len,
+ FT_Offset len,
void* user_data )
{
if ( len )
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 586bfd6c6..16dc471c5 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -50,7 +50,7 @@
/* read a glyph name and return the equivalent glyph index */
static FT_Int
t1_get_index( const char* name,
- FT_UInt len,
+ FT_Offset len,
void* user_data )
{
T1_Font type1 = (T1_Font)user_data;