#include "wx/intl.h"
#include <string.h>
-#ifdef __VISUALC__
#include <ctype.h>
-#endif
#include "wx/xpmdecod.h"
if ( !stream.Read(buf, WXSIZEOF(buf)) )
return FALSE;
- stream.SeekI(-WXSIZEOF(buf), wxFromCurrent);
+ stream.SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
return memcmp(buf, "/* XPM */", WXSIZEOF(buf)) == 0;
}
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)
{
return TRUE;
}
- name = strdup(inname);
+#ifdef __WXWINCE__
+ // TODO: is this right? How come it compiles on other
+ // platforms?
+ name = (char*) wxStrdup((wxChar*) inname);
+#else
+ name = wxStrdup(inname);
+#endif
// theRGBRecords[] has no names with spaces, and no grey, but a
// lot of gray...
{
if ( *r != *q )
continue;
- if ( !isspace((int) (*(r - 1))) )
+ if ( !wxIsspace((int) (*(r - 1))) )
continue;
p = r;
for (;;)
{
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)
{