X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1dedb80b26cd3ac1efa0a01f40467b2dc4f9e3a9..71111c40eb68392d652a94efe59c9efa45afa96a:/src/common/xpmdecod.cpp?ds=inline diff --git a/src/common/xpmdecod.cpp b/src/common/xpmdecod.cpp index 70c19c20ae..c6e10441c9 100644 --- a/src/common/xpmdecod.cpp +++ b/src/common/xpmdecod.cpp @@ -90,7 +90,7 @@ license is as follows: * in this Software without prior written authorization from GROUPE BULL. */ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "xpmdecod.h" #endif @@ -119,20 +119,6 @@ license is as follows: #include "wx/xpmdecod.h" -#ifdef __WXWINCE__ -char* strdup(const char* s) -{ - char* s2 = new char[strlen(s)]; - strcpy(s2, s); - return s2; -} - -bool isspace(char c) -{ - return (c == ' '); -} -#endif - #if wxUSE_STREAMS bool wxXPMDecoder::CanRead(wxInputStream& stream) { @@ -772,6 +758,12 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data) if ( entry == end ) { wxLogError(_("XPM: Malformed pixel data!")); + + // better return right now as otherwise we risk to flood the + // user with error messages as something seems to be seriously + // wrong with the file and so we could give this message for + // each remaining pixel if we don't bail out + return wxNullImage; } else {