Changeset 37559
- Timestamp:
- 05/15/10 19:32:15 (3 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 17 modified
- 2 moved
-
po/POTFILES.in (modified) (6 diffs)
-
src/Common.h (modified) (1 diff)
-
src/DebugEventHook.cc (modified) (2 diffs)
-
src/InputWindow.cc (modified) (3 diffs)
-
src/InputWindow.h (modified) (1 diff)
-
src/OutputWindow.h (modified) (1 diff)
-
src/gui-windows/CompletionWindowPlatform.h (modified) (1 diff)
-
src/gui-windows/InputWindowPlatform.h (modified) (1 diff)
-
src/mil/include/mil/Environment.h (modified) (1 diff)
-
src/os-windows/Os.cc (modified) (2 diffs)
-
src/os-windows/wlibintl.h (modified) (2 diffs)
-
src/tests/Test.h (modified) (1 diff)
-
src/tests/TestEvent.cc (modified) (1 diff)
-
src/tests/TestNLS.cc (modified) (3 diffs)
-
src/tests/Tester.cc (moved) (moved from lang/objective-cplusplus/i3/trunk/src/Tester.cc)
-
src/tests/Tester.h (moved) (moved from lang/objective-cplusplus/i3/trunk/src/Tester.h)
-
unix/am/i3_test.am (modified) (2 diffs)
-
windows/i3_test.vcxproj (modified) (2 diffs)
-
windows/i3_test.vcxproj.filters (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/po/POTFILES.in
r37532 r37559 3 3 src/ConfigFile.h 4 4 src/Delegate.h 5 src/InputWindow.h 6 src/Mediator.h 7 src/OutputWindow.h 8 src/ShellManager.h 9 src/Version.h 5 10 src/gui-cocoa/CompletionWindowPlatform.h 6 11 src/gui-cocoa/Gui.h … … 11 16 src/gui-windows/InputWindowPlatform.h 12 17 src/gui-windows/OutputWindowPlatform.h 13 src/InputWindow.h14 src/Mediator.h15 18 src/mil/include/mil/Atomic.h 16 19 src/mil/include/mil/Conditional.h … … 19 22 src/mil/include/mil/Environment.h 20 23 src/mil/include/mil/FilterException.h 21 src/mil/include/mil/gui-cocoa/Gui.h22 src/mil/include/mil/gui-cocoa/GuiModule.h23 src/mil/include/mil/gui-cocoa/GuiModuleObjC.h24 src/mil/include/mil/gui-cocoa/PrecompiledHeaders.h25 24 src/mil/include/mil/GuiModule.h 26 src/mil/include/mil/gui-windows/DummyMessageHandler-inl.h27 src/mil/include/mil/gui-windows/Gui.h28 src/mil/include/mil/gui-windows/GuiModule.h29 src/mil/include/mil/gui-windows/MessageCracker-inl.h30 src/mil/include/mil/gui-windows/PrecompiledHeaders.h31 src/mil/include/mil/gui-windows/WindowProcedureRedirector.h32 25 src/mil/include/mil/Intl.h 33 26 src/mil/include/mil/Memory.h … … 38 31 src/mil/include/mil/Mutex.h 39 32 src/mil/include/mil/ObjCExceptionFix.h 33 src/mil/include/mil/Pool.h 34 src/mil/include/mil/PrecompiledHeaders.h 35 src/mil/include/mil/Semaphore.h 36 src/mil/include/mil/Serial.h 37 src/mil/include/mil/Synchronize.h 38 src/mil/include/mil/Thread.h 39 src/mil/include/mil/gui-cocoa/Gui.h 40 src/mil/include/mil/gui-cocoa/GuiModule.h 41 src/mil/include/mil/gui-cocoa/GuiModuleObjC.h 42 src/mil/include/mil/gui-cocoa/PrecompiledHeaders.h 43 src/mil/include/mil/gui-windows/DummyMessageHandler-inl.h 44 src/mil/include/mil/gui-windows/Gui.h 45 src/mil/include/mil/gui-windows/GuiModule.h 46 src/mil/include/mil/gui-windows/MessageCracker-inl.h 47 src/mil/include/mil/gui-windows/PrecompiledHeaders.h 48 src/mil/include/mil/gui-windows/WindowProcedureRedirector.h 40 49 src/mil/include/mil/os-unix/Debug.h 41 50 src/mil/include/mil/os-unix/Os.h … … 48 57 src/mil/include/mil/os-windows/Sleep.h 49 58 src/mil/include/mil/os-windows/Thread.h 50 src/mil/include/mil/Pool.h51 src/mil/include/mil/PrecompiledHeaders.h52 src/mil/include/mil/Semaphore.h53 src/mil/include/mil/Serial.h54 src/mil/include/mil/Synchronize.h55 src/mil/include/mil/Thread.h56 59 src/mil/include/quicktest/quicktest.h 57 60 src/mil/include/xbyak/xbyak.h … … 62 65 src/os-unix/Os.h 63 66 src/os-unix/Pty.h 67 src/os-windows/Os.h 68 src/os-windows/Pty.h 69 src/os-windows/Utf8ToUtf16Stream.h 70 src/os-windows/WindowsCommon.h 64 71 src/os-windows/msvc/iconv.h 65 72 src/os-windows/msvc/libintl.h 66 src/os-windows/Os.h67 src/os-windows/Pty.h68 73 src/os-windows/resources/resource.h 69 src/os-windows/Utf8ToUtf16Stream.h70 src/os-windows/WindowsCommon.h71 74 src/os-windows/wlibintl.h 72 src/OutputWindow.h 73 src/ShellManager.h 74 src/Tester.h 75 src/tests/Test.h 76 src/tests/Tester.h 75 77 src/tests/no-test/Test.h 76 src/tests/Test.h 77 src/Version.h 78 src/os-windows/PtyProcess.c 78 79 src/os-windows/msvc/win_iconv.c 79 src/os-windows/PtyProcess.c -
lang/objective-cplusplus/i3/trunk/src/Common.h
r37528 r37559 9 9 #include <mil/Mil.h> 10 10 #include <mil/Module.h> 11 #include <mil/GuiModule.h> 11 12 #include <mil/Atomic.h> 12 13 #include <mil/Thread.h> -
lang/objective-cplusplus/i3/trunk/src/DebugEventHook.cc
r37319 r37559 1 1 #include <mil/PrecompiledHeaders.h> 2 #include "Common.h" 2 3 #include <mil/ModuleCommon.h> 3 4 … … 6 7 #include <boost/preprocessor/seq/fold_left.hpp> 7 8 8 char SIGN;9 static char SIGN; 9 10 10 11 #define RECEIVERS (InputWindow)(CompletionWindow)(OutputWindow)(ShellManager)(Delegate) -
lang/objective-cplusplus/i3/trunk/src/InputWindow.cc
r37319 r37559 21 21 22 22 #ifdef I3_TEST 23 23 24 I3_DEFINE_DEBUG_HOOK(InputWindow, SimplePing) { 25 debug << "input window hooked"; 24 26 if (tester.getName() == "simple ping") { 25 27 QT_CHECK(true); … … 29 31 30 32 I3_DEFINE_DEBUG_HOOK(ShellManager, SimplePing2) { 33 debug << "shell manager hooked"; 31 34 if (tester.getName() == "simple ping2") { 32 35 QT_CHECK(true); … … 34 37 } 35 38 } 39 36 40 #endif 37 41 -
lang/objective-cplusplus/i3/trunk/src/InputWindow.h
r36862 r37559 1 1 #pragma once 2 2 3 #include <mil/GuiModule.h>4 #include <mil/DoubleBuffer.h>5 3 #include "Common.h" 6 4 #include "InputWindowPlatform.h" 5 #include <mil/DoubleBuffer.h> 7 6 8 7 namespace i3 { -
lang/objective-cplusplus/i3/trunk/src/OutputWindow.h
r36835 r37559 5 5 */ 6 6 7 #include <mil/GuiModule.h>8 7 #include "Common.h" 9 8 #include "OutputWindowPlatform.h" -
lang/objective-cplusplus/i3/trunk/src/gui-windows/CompletionWindowPlatform.h
r34909 r37559 4 4 5 5 #pragma once 6 #include <mil/GuiModule.h>7 6 #include "Common.h" 8 7 -
lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.h
r36835 r37559 1 1 #pragma once 2 2 3 #include <mil/GuiModule.h>4 3 #include "Common.h" 5 4 -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Environment.h
r37099 r37559 2 2 3 3 // guess environment 4 #define MIL_ENVIRONMENT_H_INCLUDED 1 4 5 5 6 #ifdef HAVE_CONFIG_H -
lang/objective-cplusplus/i3/trunk/src/os-windows/Os.cc
r37319 r37559 323 323 // 324 324 // ----------------------------------------------------------------- 325 /* 325 326 //#ifndef _MSC_VER 326 327 #ifdef HAVE_POPT_H … … 569 570 } 570 571 #endif 572 */ -
lang/objective-cplusplus/i3/trunk/src/os-windows/wlibintl.h
r37528 r37559 25 25 26 26 /* wchar_t support */ 27 28 //typedef wchar_t *WLIBINTL_H_RETURN_TYPE; 29 typedef const wchar_t *WLIBINTL_H_RETURN_TYPE; 30 27 31 #ifdef _INTL_REDIRECT_INLINE 28 32 #define WLIBINTL_H_FUNCTION_LINKAGE static inline … … 41 45 42 46 WLIBINTL_H_FUNCTION_LINKAGE 43 wchar_t *wgettext_selector (const char *msgid, const wchar_t *wmsgid) 47 WLIBINTL_H_RETURN_TYPE 48 wgettext_selector (const char *msgid, const wchar_t *wmsgid) 44 49 { 45 50 char *translated = gettext (msgid); 46 51 if (strcmp(msgid, translated) == 0) 47 52 { 48 return ( wchar_t *)wmsgid;53 return (WLIBINTL_H_RETURN_TYPE)wmsgid; 49 54 } 50 return ( wchar_t *)translated;55 return (WLIBINTL_H_RETURN_TYPE)translated; 51 56 } 52 57 53 58 WLIBINTL_H_FUNCTION_LINKAGE 54 wchar_t *dwgettext_selector (const char *domainname, const char *msgid, const wchar_t *wmsgid) 59 WLIBINTL_H_RETURN_TYPE 60 dwgettext_selector (const char *domainname, const char *msgid, const wchar_t *wmsgid) 55 61 { 56 62 char *translated = dgettext (domainname, msgid); 57 63 if (strcmp(msgid, translated) == 0) 58 64 { 59 return ( wchar_t *)wmsgid;65 return (WLIBINTL_H_RETURN_TYPE)wmsgid; 60 66 } 61 return ( wchar_t *)translated;67 return (WLIBINTL_H_RETURN_TYPE)translated; 62 68 } 63 69 64 70 WLIBINTL_H_FUNCTION_LINKAGE 65 wchar_t *dcwgettext_selector (const char *domainname, const char *msgid, int category, const wchar_t *wmsgid) 71 WLIBINTL_H_RETURN_TYPE 72 dcwgettext_selector (const char *domainname, const char *msgid, int category, const wchar_t *wmsgid) 66 73 { 67 74 char *translated = dcgettext (domainname, msgid, category); 68 75 if (strcmp(msgid, translated) == 0) 69 76 { 70 return ( wchar_t *)wmsgid;77 return (WLIBINTL_H_RETURN_TYPE)wmsgid; 71 78 } 72 return ( wchar_t *)translated;79 return (WLIBINTL_H_RETURN_TYPE)translated; 73 80 } 74 81 75 82 WLIBINTL_H_FUNCTION_LINKAGE 76 wchar_t *nwgettext_selector (const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2) 83 WLIBINTL_H_RETURN_TYPE 84 nwgettext_selector (const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2) 77 85 { 78 86 char *translated = ngettext (msgid1, msgid2, n); 79 87 if (strcmp(msgid1, translated) == 0) 80 88 { 81 return ( wchar_t *)wmsgid1;89 return (WLIBINTL_H_RETURN_TYPE)wmsgid1; 82 90 } 83 91 else if (strcmp(msgid2, translated) == 0) 84 92 { 85 return ( wchar_t *)wmsgid2;93 return (WLIBINTL_H_RETURN_TYPE)wmsgid2; 86 94 } 87 return ( wchar_t *)translated;95 return (WLIBINTL_H_RETURN_TYPE)translated; 88 96 } 89 97 90 98 WLIBINTL_H_FUNCTION_LINKAGE 91 wchar_t *dnwgettext_selector (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2) 99 WLIBINTL_H_RETURN_TYPE 100 dnwgettext_selector (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2) 92 101 { 93 102 char *translated = dngettext (domainname, msgid1, msgid2, n); 94 103 if (strcmp(msgid1, translated) == 0) 95 104 { 96 return ( wchar_t *)wmsgid1;105 return (WLIBINTL_H_RETURN_TYPE)wmsgid1; 97 106 } 98 107 else if (strcmp(msgid2, translated) == 0) 99 108 { 100 return ( wchar_t *)wmsgid2;109 return (WLIBINTL_H_RETURN_TYPE)wmsgid2; 101 110 } 102 return ( wchar_t *)translated;111 return (WLIBINTL_H_RETURN_TYPE)translated; 103 112 } 104 113 105 114 WLIBINTL_H_FUNCTION_LINKAGE 106 wchar_t *dcnwgettext_selector (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2, int category) 115 WLIBINTL_H_RETURN_TYPE 116 dcnwgettext_selector (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2, int category) 107 117 { 108 118 char *translated = dcngettext (domainname, msgid1, msgid2, n, category); 109 119 if (strcmp(msgid1, translated) == 0) 110 120 { 111 return ( wchar_t *)wmsgid1;121 return (WLIBINTL_H_RETURN_TYPE)wmsgid1; 112 122 } 113 123 else if (strcmp(msgid2, translated) == 0) 114 124 { 115 return ( wchar_t *)wmsgid2;125 return (WLIBINTL_H_RETURN_TYPE)wmsgid2; 116 126 } 117 return ( wchar_t *)translated;127 return (WLIBINTL_H_RETURN_TYPE)translated; 118 128 } 119 129 -
lang/objective-cplusplus/i3/trunk/src/tests/Test.h
r37326 r37559 1 1 #pragma once 2 3 #ifdef MIL_ENVIRONMENT_H_INCLUDED 4 #error mil/Environment.h is already included 5 #endif 6 7 #define MIL_USE_DEBUG_EVENT_HOOK 1 2 8 #define I3_TEST 1 3 9 4 -
lang/objective-cplusplus/i3/trunk/src/tests/TestEvent.cc
r37319 r37559 52 52 t.mediator.getInputWindow().post(f, t); 53 53 sleep(1); 54 55 54 t.sendKeys("foo\n"); 56 55 } -
lang/objective-cplusplus/i3/trunk/src/tests/TestNLS.cc
r37491 r37559 20 20 namespace ns_intrusrangaaaaaaaaa { 21 21 22 #if defined(UNICODE) || defined(_UNICODE)23 24 QT_TEST(test_gettextioiadsfjdz) {25 const char* buf = (const char*)wgettext("ABCDE");26 QT_CHECK(buf[0] == 0x41);27 QT_CHECK(buf[1] == 0);28 QT_CHECK(buf[2] == 0x42);29 QT_CHECK(buf[3] == 0);30 QT_CHECK(buf[4] == 0x43);31 QT_CHECK(buf[5] == 0);32 QT_CHECK(buf[6] == 0x44);33 QT_CHECK(buf[7] == 0);34 QT_CHECK(buf[8] == 0x45);35 QT_CHECK(buf[9] == 0);36 QT_CHECK(buf[10] == 0);37 QT_CHECK(buf[11] == 0);38 }39 #endif40 41 22 #ifdef ENABLE_NLS 23 24 QT_TEST(ascii7bit_to_utf16) { 25 bind_textdomain_codeset(PACKAGE_NAME,"UTF-16BE"); 26 { 27 const char* buf = (const char*)gettext("ABC+++"); 28 QT_CHECK(buf[0] == 0); 29 QT_CHECK(buf[1] == 0x41); 30 QT_CHECK(buf[2] == 0); 31 QT_CHECK(buf[3] == 0x42); 32 QT_CHECK(buf[4] == 0); 33 QT_CHECK(buf[5] == 0x43); 34 } 35 36 { 37 const char* buf = (const char*)wgettext("DEF+++"); 38 QT_CHECK(buf[0] == 0); 39 QT_CHECK(buf[1] == 0x44); 40 QT_CHECK(buf[2] == 0); 41 QT_CHECK(buf[3] == 0x45); 42 QT_CHECK(buf[4] == 0); 43 QT_CHECK(buf[5] == 0x46); 44 } 45 46 { 47 const char* buf = (const char*)_("GHI+++"); 48 QT_CHECK(buf[0] == 0); 49 QT_CHECK(buf[1] == 0x47); 50 QT_CHECK(buf[2] == 0); 51 QT_CHECK(buf[3] == 0x48); 52 QT_CHECK(buf[4] == 0); 53 QT_CHECK(buf[5] == 0x49); 54 } 55 56 bind_textdomain_codeset(PACKAGE_NAME,"UTF-16LE"); 57 { 58 const char* buf = (const char*)gettext("ABC+++"); 59 QT_CHECK(buf[0] == 0x41); 60 QT_CHECK(buf[1] == 0); 61 QT_CHECK(buf[2] == 0x42); 62 QT_CHECK(buf[3] == 0); 63 QT_CHECK(buf[4] == 0x43); 64 QT_CHECK(buf[5] == 0); 65 } 66 67 { 68 const char* buf = (const char*)wgettext("DEF+++"); 69 QT_CHECK(buf[0] == 0x44); 70 QT_CHECK(buf[1] == 0); 71 QT_CHECK(buf[2] == 0x45); 72 QT_CHECK(buf[3] == 0); 73 QT_CHECK(buf[4] == 0x46); 74 QT_CHECK(buf[5] == 0); 75 } 76 77 { 78 const char* buf = (const char*)_("GHI+++"); 79 QT_CHECK(buf[0] == 0x47); 80 QT_CHECK(buf[1] == 0); 81 QT_CHECK(buf[2] == 0x48); 82 QT_CHECK(buf[3] == 0); 83 QT_CHECK(buf[4] == 0x49); 84 QT_CHECK(buf[5] == 0); 85 } 86 87 int argc = 0; 88 char** argv = NULL; 89 QT_CHECK(!init_common_global_data(argc, argv)); 90 QT_CHECK(!init_os_global_data(argc, argv)); 91 QT_CHECK(!init_gui_global_data(argc, argv)); 92 } 42 93 43 94 void dump_string(const TCHAR* str) { … … 103 154 my_setenv(env_list[i], locale); 104 155 } 105 156 106 157 setlocale(LC_ALL, locale); 107 108 158 textdomain(PACKAGE_NAME); 159 109 160 return 0; 110 161 } … … 184 235 check_translation("Hello, world!", _T("Hello, world!")); 185 236 237 QT_CHECK_NOT_EQUAL(set_locale("da"), -1); 238 check_translation("Hello, world!", _T("Hej verden!")); 239 240 QT_CHECK_NOT_EQUAL(set_locale("de"), -1); 241 check_translation("Hello, world!", _T("Hallo, Welt!")); 242 186 243 QT_CHECK_NOT_EQUAL(set_locale("ja_JP" JA_ENCODING), -1); 187 244 check_translation("Hello, world!", hello_world_ja); 188 245 189 QT_CHECK_NOT_EQUAL(set_locale("da"), -1); 190 check_translation("Hello, world!", _T("Hej verden!")); 246 QT_CHECK_NOT_EQUAL(set_locale("lv"), -1); 247 check_translation("Hello, world!", _T("Sveika, pasaule!")); 248 249 QT_CHECK_NOT_EQUAL(set_locale("ja_JP" JA_ENCODING), -1); 250 check_translation("Hello, world!", hello_world_ja); 251 252 QT_CHECK_NOT_EQUAL(set_locale("en"), -1); 253 check_translation("Hello, world!", _T("Hello, world!")); 191 254 192 255 QT_CHECK_NOT_EQUAL(set_locale("de"), -1); 193 256 check_translation("Hello, world!", _T("Hallo, Welt!")); 194 195 QT_CHECK_NOT_EQUAL(set_locale("lv"), -1);196 check_translation("Hello, world!", _T("Sveika, pasaule!"));197 198 QT_CHECK_NOT_EQUAL(set_locale("ja_JP" JA_ENCODING), -1);199 check_translation("Hello, world!", hello_world_ja);200 201 QT_CHECK_NOT_EQUAL(set_locale("en"), -1);202 check_translation("Hello, world!", _T("Hello, world!"));203 204 QT_CHECK_NOT_EQUAL(set_locale("de"), -1);205 check_translation("Hello, world!", _T("Hallo, Welt!"));206 257 } 207 258 -
lang/objective-cplusplus/i3/trunk/unix/am/i3_test.am
r37454 r37559 3 3 i3_test_SOURCES = $(i3_SOURCES_NO_MAIN) \ 4 4 src/mil/src/test/Main.cc \ 5 src/ Tester.cc \5 src/tests/Tester.cc \ 6 6 src/tests/TestNLS.cc \ 7 7 src/tests/TestConfigFile.cc \ … … 18 18 i3_test_LDADD += libmilobjcexceptionfilter.a 19 19 endif 20 -
lang/objective-cplusplus/i3/trunk/windows/i3_test.vcxproj
r37532 r37559 1 <?xml version="1.0" encoding="utf-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <ItemGroup Label="ProjectConfigurations"> … … 105 105 <ClCompile Include="..\src\OutputWindow.cc" /> 106 106 <ClCompile Include="..\src\ShellManager.cc" /> 107 <ClCompile Include="..\src\ Tester.cc" />107 <ClCompile Include="..\src\tests\Tester.cc" /> 108 108 <ClCompile Include="..\src\tests\TestConfigFile.cc" /> 109 109 <ClCompile Include="..\src\tests\TestEvent.cc" /> -
lang/objective-cplusplus/i3/trunk/windows/i3_test.vcxproj.filters
r37320 r37559 1 <?xml version="1.0" encoding="utf-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <ItemGroup> … … 46 46 <Filter>Source Files</Filter> 47 47 </ClCompile> 48 <ClCompile Include="..\src\ Tester.cc">48 <ClCompile Include="..\src\tests\Tester.cc"> 49 49 <Filter>Source Files</Filter> 50 50 </ClCompile>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)