// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
-// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-# pragma implementation "pngread.h"
-# pragma implementation "pnghand.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
# pragma hdrstop
#endif
+#if 0 // wxUSE_LIBPNG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#if defined(__DARWIN__)
+/* MW's math routines do certain things if __FP__ (the include guard around
+CarbonCore's fp.h) is defined. CarbonCore's fp.h does certain things if
+__cmath__ is defined so it seems the easy thing to do is to make sure
+__cmath__ is effectively not defined which counteracts the MWERKS check
+then when the real cmath is included everything will be okay.
+*/
+#include <CoreServices/CoreServices.h>
+//#include <cmath>
+#endif //defined(__DARWIN__)
+
#if wxUSE_IOSTREAMH
# include <fstream.h>
#else
void
ima_png_error(png_struct *png_ptr, char *message)
{
- wxMessageBox(message, "PNG error");
+ wxMessageBox(wxString::FromAscii(message), wxT("PNG error"));
longjmp(png_ptr->jmpbuf, 1);
}
strcpy(nameStr, name);
else
{
- strcpy(nameStr, filename);
- wxStripExtension(nameStr);
+ wxString str = wxString::FromAscii(filename) ;
+ wxStripExtension( str ) ;
+ strcpy(nameStr, str.ToAscii() );
}
if ( GetDepth() > 4 )
int desiredWidth, int desiredHeight)
{
wxPNGReader reader;
- if (reader.ReadFile((char*) (const char*) name))
+ if (reader.ReadFile( (char*)(const char*) name.ToAscii() ) )
{
return reader.InstantiateBitmap(bitmap);
}
return FALSE;
}
-
+#endif //wxUSE_LIBPNG