Commit d200982d8b35be32c75f2af9c9b175af190d5a9d

suzuki toshiya 2009-08-01T00:30:17

psaux: Use size_t variable to pass the buffer size.

diff --git a/ChangeLog b/ChangeLog
index 377dae7..fbb6845 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2009-07-31  suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
 
+	psaux: Use size_t variable to pass the buffer size.
+
+	* src/psaux/psaux.h (to_bytes): The type of `max_bytes'
+	(the argument to pass the buffer size) is changed to
+	size_t, to match with ANSI C string functions.
+
+	* src/psaux/psconv.h (PS_Conv_StringDecode,
+	PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
+
+	* src/psaux/psconv.c (PS_Conv_StringDecode,
+	PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
+
+	* src/psaux/psobjs.h (ps_parser_to_bytes): Ditto.
+
+	* src/psaux/psobjs.c (ps_parser_to_bytes): Ditto.
+
+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
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 235ba7f..c53e364 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -360,7 +360,7 @@ FT_BEGIN_HEADER
     FT_Error
     (*to_bytes)( PS_Parser  parser,
                  FT_Byte*   bytes,
-                 FT_Long    max_bytes,
+                 FT_Offset  max_bytes,
                  FT_Long*   pnum_bytes,
                  FT_Bool    delimiters );
 
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index ef85ca3..1531d8f 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -239,7 +239,7 @@
   PS_Conv_StringDecode( FT_Byte**  cursor,
                         FT_Byte*   limit,
                         FT_Byte*   buffer,
-                        FT_UInt    n )
+                        FT_Offset  n )
   {
     FT_Byte*  p;
     FT_UInt   r = 0;
@@ -334,7 +334,7 @@
   PS_Conv_ASCIIHexDecode( FT_Byte**  cursor,
                           FT_Byte*   limit,
                           FT_Byte*   buffer,
-                          FT_UInt    n )
+                          FT_Offset  n )
   {
     FT_Byte*  p;
     FT_UInt   r   = 0;
@@ -423,7 +423,7 @@
   PS_Conv_EexecDecode( FT_Byte**   cursor,
                        FT_Byte*    limit,
                        FT_Byte*    buffer,
-                       FT_UInt     n,
+                       FT_Offset   n,
                        FT_UShort*  seed )
   {
     FT_Byte*  p;
diff --git a/src/psaux/psconv.h b/src/psaux/psconv.h
index e511241..84854ba 100644
--- a/src/psaux/psconv.h
+++ b/src/psaux/psconv.h
@@ -46,20 +46,20 @@ FT_BEGIN_HEADER
   PS_Conv_StringDecode( FT_Byte**  cursor,
                         FT_Byte*   limit,
                         FT_Byte*   buffer,
-                        FT_UInt    n );
+                        FT_Offset  n );
 #endif
 
   FT_LOCAL( FT_UInt )
   PS_Conv_ASCIIHexDecode( FT_Byte**  cursor,
                           FT_Byte*   limit,
                           FT_Byte*   buffer,
-                          FT_UInt    n );
+                          FT_Offset  n );
 
   FT_LOCAL( FT_UInt )
   PS_Conv_EexecDecode( FT_Byte**   cursor,
                        FT_Byte*    limit,
                        FT_Byte*    buffer,
-                       FT_UInt     n,
+                       FT_Offset   n,
                        FT_UShort*  seed );
 
 
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 934509e..fe8398a 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1313,7 +1313,7 @@
   FT_LOCAL_DEF( FT_Error )
   ps_parser_to_bytes( PS_Parser  parser,
                       FT_Byte*   bytes,
-                      FT_Long    max_bytes,
+                      FT_Offset  max_bytes,
                       FT_Long*   pnum_bytes,
                       FT_Bool    delimiters )
   {
diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h
index c2cbf2c..e380c60 100644
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -111,7 +111,7 @@ FT_BEGIN_HEADER
   FT_LOCAL( FT_Error )
   ps_parser_to_bytes( PS_Parser  parser,
                       FT_Byte*   bytes,
-                      FT_Long    max_bytes,
+                      FT_Offset  max_bytes,
                       FT_Long*   pnum_bytes,
                       FT_Bool    delimiters );