* in this Software without prior written authorization from GROUPE BULL.
*/
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "xpmdecod.h"
#endif
#include "wx/intl.h"
#include <string.h>
-#ifdef __VISUALC__
#include <ctype.h>
-#endif
#include "wx/xpmdecod.h"
wxCharBuffer buffer(length);
char *xpm_buffer = (char *)buffer.data();
- if ( stream.Read(xpm_buffer, length).LastError() == wxSTREAM_READ_ERROR )
+ if ( stream.Read(xpm_buffer, length).GetLastError() == wxSTREAM_READ_ERROR )
return wxNullImage;
xpm_buffer[length] = '\0';
{"seagreen", myRGB(82, 149, 132)},
{"seashell", myRGB(255, 245, 238)},
{"sienna", myRGB(150, 82, 45)},
+ {"silver", myRGB(192, 192, 192)},
{"skyblue", myRGB(114, 159, 255)},
{"slateblue", myRGB(126, 136, 171)},
{"slategray", myRGB(112, 128, 144)},
{"yellowgreen", myRGB(50, 216, 56)},
{NULL, myRGB(0, 0, 0)}
};
-static int numTheRGBRecords = 234;
+static int numTheRGBRecords = 235;
static unsigned char ParseHexadecimal(char digit1, char digit2)
{
{
unsigned char R,G,B;
};
-WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap)
+WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap);
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
{