]> git.saurik.com Git - wxWidgets.git/commitdiff
minor changes for windows compilability
authorUnknown (UG) <nobody@localhost>
Sun, 25 Oct 1998 01:48:51 +0000 (01:48 +0000)
committerUnknown (UG) <nobody@localhost>
Sun, 25 Oct 1998 01:48:51 +0000 (01:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/image.cpp

index dae0abc86cda7db4ab3c4341d215669ed68b3f51..1414471ecac951c8e95d6e92c80a4a3088738ade 100644 (file)
 #pragma implementation "image.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
 #include "wx/image.h"
 #include "wx/debug.h"
 #include "wx/log.h"
@@ -320,6 +327,7 @@ bool wxPNGHandler::LoadFile( wxImage *image, const wxString& name )
    unsigned char      *ptr, **lines, *ptr2;
    int                 transp,bit_depth,color_type,interlace_type;
    png_uint_32         width, height;
+   unsigned int               i;
 
    image->Destroy();
    
@@ -375,7 +383,7 @@ bool wxPNGHandler::LoadFile( wxImage *image, const wxString& name )
      return FALSE;
    }
    
-   for (unsigned int i = 0; i < height; i++)
+   for (i = 0; i < height; i++)
    {
      if ((lines[i] = (unsigned char *)malloc(width * (sizeof(unsigned char) * 4))) == NULL)
      {
@@ -444,7 +452,7 @@ bool wxPNGHandler::LoadFile( wxImage *image, const wxString& name )
               }
          }
      }
-   for (unsigned int i = 0; i < height; i++) free( lines[i] );
+   for (i = 0; i < height; i++) free( lines[i] );
    free( lines );
    if (transp)
      image->SetMaskColour( 255, 0, 255 );
@@ -556,11 +564,12 @@ bool wxBMPHandler::LoadFile( wxImage *image, const wxString& name )
        unsigned char       r, g, b;
      }
                       *cmap = NULL;
-
+#ifndef BI_RGB
 #define BI_RGB       0
 #define BI_RLE8      1
 #define BI_RLE4      2
 #define BI_BITFIELDS 3
+#endif
 
   image->Destroy();