cvs: gd /playground/gdbmp bmp.h gd_bmp.c

[email protected] ("Scott MacVicar") Sat, 13 Oct 2007 18:18:30 -0000
Newsgroups php.gd.cvs
Message-ID <cvsscottmac1192299510@cvsserver>
scottmac		Sat Oct 13 18:18:30 2007 UTC

  Modified files:              
    /gd/playground/gdbmp	bmp.h gd_bmp.c 
  Log:
  Make the spelling of color consistent with the rest of libgd, though colour is the correct way... :)
  
http://cvs.php.net/viewvc.cgi/gd/playground/gdbmp/bmp.h?r1=1.1&r2=1.2&diff_format=u
Index: gd/playground/gdbmp/bmp.h
diff -u gd/playground/gdbmp/bmp.h:1.1 gd/playground/gdbmp/bmp.h:1.2
--- gd/playground/gdbmp/bmp.h:1.1	Fri Oct  5 09:09:11 2007
+++ gd/playground/gdbmp/bmp.h	Sat Oct 13 18:18:30 2007
@@ -91,10 +91,10 @@
 	signed int vres;
 
 	/* 32bit - The number of color indices used by the bitmap. */
-	signed int numcolours;
+	signed int numcolors;
 
 	/* 32bit - The number of color indices important for displaying the bitmap. */
-	signed int mincolours;
+	signed int mincolors;
 
 } bmp_info_t;
 
http://cvs.php.net/viewvc.cgi/gd/playground/gdbmp/gd_bmp.c?r1=1.1&r2=1.2&diff_format=u
Index: gd/playground/gdbmp/gd_bmp.c
diff -u gd/playground/gdbmp/gd_bmp.c:1.1 gd/playground/gdbmp/gd_bmp.c:1.2
--- gd/playground/gdbmp/gd_bmp.c:1.1	Fri Oct  5 09:09:11 2007
+++ gd/playground/gdbmp/gd_bmp.c	Sat Oct 13 18:18:30 2007
@@ -96,7 +96,7 @@
 		return NULL;
 	}
 
-	BMP_DEBUG(printf("Numcolours: %d\n", info->numcolours));
+	BMP_DEBUG(printf("Numcolours: %d\n", info->numcolors));
 	BMP_DEBUG(printf("Width: %d\n", info->width));
 	BMP_DEBUG(printf("Height: %d\n", info->height));
 	BMP_DEBUG(printf("Planes: %d\n", info->numplanes));
@@ -220,8 +220,8 @@
 		!gdBMPGetInt(&info->size, infile) ||
 		!gdBMPGetInt(&info->hres, infile) ||
 		!gdBMPGetInt(&info->vres, infile) ||
-		!gdBMPGetInt(&info->numcolours, infile) ||
-		!gdBMPGetInt(&info->mincolours, infile)
+		!gdBMPGetInt(&info->numcolors, infile) ||
+		!gdBMPGetInt(&info->mincolors, infile)
 	)
 	{
 		return 1;
@@ -240,7 +240,7 @@
 	info->type = BMP_PALETTE_4;
 
 	if (info->width <= 0 || info->height <= 0 || info->numplanes <= 0 ||
-	  info->depth <= 0  || info->numcolours < 0 || info->mincolours < 0)
+	  info->depth <= 0  || info->numcolors < 0 || info->mincolors < 0)
 	{
 		return 1;
 	}
@@ -263,11 +263,11 @@
 	/* OS2 v1 doesn't support topdown */
 	info->topdown = 0;
 
-	info->numcolours = 1 << info->depth;
+	info->numcolors = 1 << info->depth;
 	info->type = BMP_PALETTE_3;
 
 	if (info->width <= 0 || info->height <= 0 || info->numplanes <= 0 ||
-	  info->depth <= 0 || info->numcolours < 0)
+	  info->depth <= 0 || info->numcolors < 0)
 	{
 		return 1;
 	}
@@ -287,8 +287,8 @@
 		!gdBMPGetInt(&info->size, infile) ||
 		!gdBMPGetInt(&info->hres, infile) ||
 		!gdBMPGetInt(&info->vres, infile) ||
-		!gdBMPGetInt(&info->numcolours, infile) ||
-		!gdBMPGetInt(&info->mincolours, infile)
+		!gdBMPGetInt(&info->numcolors, infile) ||
+		!gdBMPGetInt(&info->mincolors, infile)
 	)
 	{
 		return 1;
@@ -313,7 +313,7 @@
 	info->type = BMP_PALETTE_4;
 
 	if (info->width <= 0 || info->height <= 0 || info->numplanes <= 0 ||
-	 info->depth <= 0  || info->numcolours < 0 || info->mincolours < 0)
+	 info->depth <= 0  || info->numcolors < 0 || info->mincolors < 0)
 	{
 		return 1;
 	}
@@ -464,21 +464,21 @@
 		return 1;
 	}
 
-	if (!info->numcolours)
+	if (!info->numcolors)
 	{
-		info->numcolours = 2;
+		info->numcolors = 2;
 	}
-	else if (info->numcolours < 0 || info->numcolours > 2)
+	else if (info->numcolors < 0 || info->numcolors > 2)
 	{
 		return 1;
 	}
 
-	if (bmp_read_palette(im, infile, info->numcolours, (info->type == BMP_PALETTE_4)))
+	if (bmp_read_palette(im, infile, info->numcolors, (info->type == BMP_PALETTE_4)))
 	{
 		return 1;
 	}
 
-	im->colorsTotal = info->numcolours;
+	im->colorsTotal = info->numcolors;
 
 	/* There is a chance the data isn't until later, would be wierd but it is possible */
 	if (gdTell(infile) != header->off)
@@ -546,21 +546,21 @@
 		return 1;
 	}
 
-	if (!info->numcolours)
+	if (!info->numcolors)
 	{
-		info->numcolours = 16;
+		info->numcolors = 16;
 	}
-	else if (info->numcolours < 0 || info->numcolours > 16)
+	else if (info->numcolors < 0 || info->numcolors > 16)
 	{
 		return 1;
 	}
 
-	if (bmp_read_palette(im, infile, info->numcolours, (info->type == BMP_PALETTE_4)))
+	if (bmp_read_palette(im, infile, info->numcolors, (info->type == BMP_PALETTE_4)))
 	{
 		return 1;
 	}
 
-	im->colorsTotal = info->numcolours;
+	im->colorsTotal = info->numcolors;
 
 	/* There is a chance the data isn't until later, would be wierd but it is possible */
 	if (gdTell(infile) != header->off)
@@ -630,22 +630,22 @@
 		return 1;
 	}
 
-	if (!info->numcolours)
+	if (!info->numcolors)
 	{
-		info->numcolours = 256;
+		info->numcolors = 256;
 	}
 
-	else if (info->numcolours < 0 || info->numcolours > 256)
+	else if (info->numcolors < 0 || info->numcolors > 256)
 	{
 		return 1;
 	}
 
-	if (bmp_read_palette(im, infile, info->numcolours, (info->type == BMP_PALETTE_4)))
+	if (bmp_read_palette(im, infile, info->numcolors, (info->type == BMP_PALETTE_4)))
 	{
 		return 1;
 	}
 
-	im->colorsTotal = info->numcolours;
+	im->colorsTotal = info->numcolors;
 
 	/* There is a chance the data isn't until later, would be wierd but it is possible */
 	if (gdTell(infile) != header->off)