Commits

scottmac  committed b918d33

Make the spelling of color consistent with the rest of libgd, though colour is the correct way... :)

  • Participants
  • Parent commits e8863a6

Comments (0)

Files changed (2)

 	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;
 

File gdbmp/gd_bmp.c

 		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));
 		!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;
 	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;
 	}
 	/* 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;
 	}
 		!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;
 	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;
 	}
 		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)
 		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)
 		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)