From: Vadim Zeitlin Date: Tue, 10 Sep 2002 23:27:24 +0000 (+0000) Subject: Windows and Unicode compilation fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f1389d464a7570563c4037610e18bcffb96e50fa Windows and Unicode compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/console/console.cpp b/samples/console/console.cpp index c71f9c7381..d63263979a 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -2486,6 +2486,8 @@ static void TestDbOpen() int wxSprintf( wxChar *str, const wxChar *format, ... ); #endif +#include "wx/longlong.h" + #include static void rfg1 (void); @@ -2587,8 +2589,8 @@ fp_test (void) static void TestPrintf() { static wxChar shortstr[] = _T("Hi, Z."); - static wxChar longstr[] = "Good morning, Doctor Chandra. This is Hal. \ -I am ready for my first lesson today."; + static wxChar longstr[] = _T("Good morning, Doctor Chandra. This is Hal. \ +I am ready for my first lesson today."); int result = 0; fmtchk(_T("%.4x")); @@ -2707,19 +2709,21 @@ I am ready for my first lesson today."; wxPuts (result != 0 ? _T("Test failed!") : _T("Test ok.")); } +#ifdef wxLongLong_t { - wxChar buf[200]; + wxChar buf[200]; - wxSprintf (buf, _T("%07Lo"), 040000000000ll); - wxPrintf (_T("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s"), buf); + wxSprintf (buf, _T("%07Lo"), (wxLongLong_t)040000000000); + wxPrintf (_T("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s"), buf); - if (wxStrcmp (buf, _T("40000000000")) != 0) + if (wxStrcmp (buf, _T("40000000000")) != 0) { - result = 1; - wxPuts (_T("\tFAILED")); + result = 1; + wxPuts (_T("\tFAILED")); } - wxPuts (""); + wxPuts (_T("")); } +#endif // wxLongLong_t wxPrintf (_T("printf (\"%%hhu\", %u) = %hhu\n"), UCHAR_MAX + 2, UCHAR_MAX + 2); wxPrintf (_T("printf (\"%%hu\", %u) = %hu\n"), USHRT_MAX + 2, USHRT_MAX + 2);