]> git.imager.perl.org - imager.git/blobdiff - io.c
convert t/t55trans.t to Test::More
[imager.git] / io.c
diff --git a/io.c b/io.c
index 186eea42388179fba4358b377ce0458550745662..df00421c0d7ef7edaf36e638be6d455e9222191d 100644 (file)
--- a/io.c
+++ b/io.c
@@ -1,4 +1,5 @@
 #include "imager.h"
+#include "imageri.h"
 #include <stdlib.h>
 #ifndef _MSC_VER
 #include <unistd.h>
@@ -320,13 +321,13 @@ i_mempool_destroy(i_mempool *mp) {
 #undef min
 #undef max
 
-int
-i_min(int a,int b) {
+i_img_dim
+i_minx(i_img_dim a, i_img_dim b) {
   if (a<b) return a; else return b;
 }
 
-int
-i_max(int a,int b) {
+i_img_dim
+i_maxx(i_img_dim a, i_img_dim b) {
   if (a>b) return a; else return b;
 }
 
@@ -345,23 +346,23 @@ struct utf8_size utf8_sizes[] =
 };
 
 /*
-=item utf8_advance(char **p, int *len)
+=item i_utf8_advance(char **p, size_t *len)
 
-Retreive a UTF8 character from the stream.
+Retrieve a C<UTF-8> character from the stream.
 
 Modifies *p and *len to indicate the consumed characters.
 
-This doesn't support the extended UTF8 encoding used by later versions
-of Perl.
+This doesn't support the extended C<UTF-8> encoding used by later
+versions of Perl.
 
-This doesn't check that the UTF8 charecter is using the shortest
+This doesn't check that the C<UTF-8> character is using the shortest
 possible representation.
 
 =cut
 */
 
 unsigned long 
-i_utf8_advance(char const **p, int *len) {
+i_utf8_advance(char const **p, size_t *len) {
   unsigned char c;
   int i, ci, clen = 0;
   unsigned char codes[3];