Commits

pierre  committed 445e5e9

- sync to 2.0.33

  • Participants
  • Parent commits 5f9dbb2

Comments (0)

Files changed (3)

File src/gd_gif_out.c

 		*/
 		gdImagePtr prev_pim = 0, prev_tim = previm;
 		int x, y;
-		int min_x;
+		int min_x = 0;
 		int min_y = tim->sy;
-		int max_x;
-		int max_y;
+		int max_x = 0;
+		int max_y = 0;
 		int colorMap[256];
 
 		if (previm->trueColor) {

File src/gdcmpgif.c

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h> /* For unlink function */
+
 #include "gd.h"
 
 /* A short program which converts a .png file into a .gd file, for
 	}
       else if (encoding == gdFTEX_Big5)
 	{
+/* renamed sometime after freetype-2.1.4 */
+#ifndef FT_ENCODING_BIG5
+#define FT_ENCODING_BIG5 FT_ENCODING_MS_BIG5
+#endif
 	  if (charmap->encoding == FT_ENCODING_BIG5)
 	    {
 	      encodingfound++;
 	}
       else if (encoding == gdFTEX_Shift_JIS)
 	{
+/* renamed sometime after freetype-2.1.4 */
+#ifndef FT_ENCODING_SJIS
+#define FT_ENCODING_SJIS FT_ENCODING_MS_SJIS
+#endif
 	  if (charmap->encoding == FT_ENCODING_SJIS)
 	    {
 	      encodingfound++;
 #else
       if (encoding == gdFTEX_Unicode)
 	{
-	  if ((charmap->platform = 3 && charmap->encoding == 1)     /* Windows Unicode */
-	      || (charmap->platform == 3 && charmap->encoding == 0) /* Windows Symbol */
-	      || (charmap->platform == 2 && charmap->encoding == 1) /* ISO Unicode */
-	      || (charmap->platform == 0))                          /* Apple Unicode */
+	  if ((charmap->platform_id = 3 && charmap->encoding_id == 1)     /* Windows Unicode */
+	      || (charmap->platform_id == 3 && charmap->encoding_id == 0) /* Windows Symbol */
+	      || (charmap->platform_id == 2 && charmap->encoding_id == 1) /* ISO Unicode */
+	      || (charmap->platform_id == 0))                          /* Apple Unicode */
 	    {
 	      encodingfound++;
 	      break;
 	}
       else if (encoding == gdFTEX_Big5)
 	{
-          if (charmap->platform == 3 && charmap->encoding == 4)     /* Windows Big5 */
+          if (charmap->platform_id == 3 && charmap->encoding_id == 4)     /* Windows Big5 */
 	    {
 	      encodingfound++;
 	      break;
 	}
       else if (encoding == gdFTEX_Shift_JIS)
 	{
-          if (charmap->platform == 3 && charmap->encoding == 2)     /* Windows Sjis */
+          if (charmap->platform_id == 3 && charmap->encoding_id == 2)     /* Windows Sjis */
 	    {
 	      encodingfound++;
 	      break;
 #if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 3)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
       	      if (charmap->encoding == FT_ENCODING_MS_SYMBOL)
 #else
-	      if (charmap->platform == 3 && charmap->encoding == 0)
+	      if (charmap->platform_id == 3 && charmap->encoding_id == 0)
 #endif /* Freetype 2.1 or better */
 		{
 		  /* I do not know the significance of the constant 0xf000. */