// declarations
// ============================================================================
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "imagpng.h"
-#endif
-
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#if wxUSE_STREAMS
#ifndef PNGLINKAGEMODE
- #ifdef __WATCOMC__
+ #if defined(__WATCOMC__) && ( defined(__WXMSW__) || defined(__WXMGL__) )
// we need an explicit cdecl for Watcom, at least according to
//
// http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863
WX_PNG_INFO(png_ptr)->stream.out->Write(data, length);
}
-// from pngerror.c
-// so that the libpng doesn't send anything on stderr
-void
-PNGLINKAGEMODE wx_png_error(png_structp WXUNUSED(png_ptr), png_const_charp message)
-{
- wxLogFatalError( wxString::FromAscii(message) );
-}
-
void
PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message)
{
wxLogWarning( wxString::FromAscii(message) );
}
+// from pngerror.c
+// so that the libpng doesn't send anything on stderr
+void
+PNGLINKAGEMODE wx_png_error(png_structp WXUNUSED(png_ptr), png_const_charp message)
+{
+ // JS: deliver it to wx_png_warning and don't perform any more actions:
+ // libpng will jump back to the calling function (LoadFile and SaveFile)
+ // and allow it to handle the error
+ wx_png_warning(NULL, message);
+}
+
} // extern "C"
// ----------------------------------------------------------------------------