const unsigned char* bytes = (unsigned char*)data;
wxString result;
- result.Printf( _T("const static unsigned char %s[%i] = \n{"), name, (int)len );
+ result.Printf( _T("static const unsigned char %s[%i] = \n{"), name, (int)len );
for ( size_t i = 0; i < len; i++ )
{
// characters, encoded in several different formats.
// encoded by iconv
-const static unsigned char welcome_utf7_iconv[84] =
+static const unsigned char welcome_utf7_iconv[84] =
{
0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x20,0x74,0x6f,0x20,0x6f,0x75,0x72,0x20,0x63,
0x79,0x62,0x65,0x72,0x20,0x73,0x70,0x61,0x63,0x65,0x20,0x66,0x6f,0x72,0x63,0x65,
0x57,0x54,0x41,0x43
};
// encoded by wxWindows (iconv can decode this successfully)
-const static unsigned char welcome_utf7_wx[109] =
+static const unsigned char welcome_utf7_wx[109] =
{
0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x2b,0x41,0x43,0x41,0x2d,0x74,0x6f,0x2b,0x41,
0x43,0x41,0x2d,0x6f,0x75,0x72,0x2b,0x41,0x43,0x41,0x2d,0x63,0x79,0x62,0x65,0x72,
0x51,0x77,0x52,0x44,0x42,0x6e,0x4d,0x46,0x6b,0x77,0x41,0x67,0x2d
};
// encoded by iconv
-const static unsigned char welcome_utf8[89] =
+static const unsigned char welcome_utf8[89] =
{
0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x20,0x74,0x6f,0x20,0x6f,0x75,0x72,0x20,0x63,
0x79,0x62,0x65,0x72,0x20,0x73,0x70,0x61,0x63,0x65,0x20,0x66,0x6f,0x72,0x63,0x65,
0xe3,0x81,0xa7,0xe3,0x81,0x99,0xe3,0x80,0x82
};
// encoded by iconv
-const static unsigned char welcome_utf16le[106] =
+static const unsigned char welcome_utf16le[106] =
{
0x57,0x00,0x65,0x00,0x6c,0x00,0x63,0x00,0x6f,0x00,0x6d,0x00,0x65,0x00,0x20,0x00,
0x74,0x00,0x6f,0x00,0x20,0x00,0x6f,0x00,0x75,0x00,0x72,0x00,0x20,0x00,0x63,0x00,
0x44,0x30,0x44,0x30,0x67,0x30,0x59,0x30,0x02,0x30
};
// encoded by iconv
-const static unsigned char welcome_utf16be[106] =
+static const unsigned char welcome_utf16be[106] =
{
0x00,0x57,0x00,0x65,0x00,0x6c,0x00,0x63,0x00,0x6f,0x00,0x6d,0x00,0x65,0x00,0x20,
0x00,0x74,0x00,0x6f,0x00,0x20,0x00,0x6f,0x00,0x75,0x00,0x72,0x00,0x20,0x00,0x63,
0x30,0x44,0x30,0x44,0x30,0x67,0x30,0x59,0x30,0x02
};
// encoded by iconv
-const static unsigned char welcome_utf32le[212] =
+static const unsigned char welcome_utf32le[212] =
{
0x57,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x6f,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x02,0x30,0x00,0x00
};
// encoded by iconv
-const static unsigned char welcome_utf32be[212] =
+static const unsigned char welcome_utf32be[212] =
{
0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x63,
0x00,0x00,0x00,0x6f,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x20,
0x00,0x00,0x30,0x02
};
// encoded by iconv
-const static unsigned char welcome_cp932[71] =
+static const unsigned char welcome_cp932[71] =
{
0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x20,0x74,0x6f,0x20,0x6f,0x75,0x72,0x20,0x63,
0x79,0x62,0x65,0x72,0x20,0x73,0x70,0x61,0x63,0x65,0x20,0x66,0x6f,0x72,0x63,0x65,
0x84,0xa2
};
+// this is unused currently so avoid warnings about this
+#if 0
+
// a character sequence encoded as iso8859-5 (iconv)
static const unsigned char iso8859_5[251] =
{
0x92,0xd1,0x93,0xd1,0x94,0xd1,0x95,0xd1,0x96,0xd1,0x97,0xd1,0x98,0xd1,0x99,0xd1,
0x9a,0xd1,0x9b,0xd1,0x9c,0xd1,0x9e,0xd1,0x9f,0xe2,0x84,0x96
};
+#endif // 0
// DecodeUTF8
// decodes the specified *unterminated* UTF-8 byte array
static const char nulstr[] = "foo\0bar\0";
static const size_t mbLen = WXSIZEOF(nulstr) - 1;
size_t wcLen;
- wxWCharBuffer wbuf(wxConvISO8859_1.cMB2WC(nulstr, mbLen, &wcLen));
+ wxConvISO8859_1.cMB2WC(nulstr, mbLen, &wcLen);
CPPUNIT_ASSERT_EQUAL( mbLen, wcLen );
}
textOutputStream.Flush();
- CPPUNIT_ASSERT_EQUAL( (wxFileOffset)multiBytes, memoryOutputStream.TellO() );
+ CPPUNIT_ASSERT_EQUAL( multiBytes, size_t(memoryOutputStream.TellO()) );
wxCharBuffer copy( memoryOutputStream.TellO() );
memoryOutputStream.CopyTo( copy.data(), memoryOutputStream.TellO());
CPPUNIT_ASSERT_EQUAL( 0, memcmp( copy.data(), multiBuffer, multiBytes ) );