Show
Ignore:
Timestamp:
05/15/10 19:32:15 (5 years ago)
Author:
saturday06
Message:

iconv majide ugoiteruno ...?

Location:
lang/objective-cplusplus/i3/trunk
Files:
17 modified
2 moved

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/po/POTFILES.in

    r37532 r37559  
    33src/ConfigFile.h 
    44src/Delegate.h 
     5src/InputWindow.h 
     6src/Mediator.h 
     7src/OutputWindow.h 
     8src/ShellManager.h 
     9src/Version.h 
    510src/gui-cocoa/CompletionWindowPlatform.h 
    611src/gui-cocoa/Gui.h 
     
    1116src/gui-windows/InputWindowPlatform.h 
    1217src/gui-windows/OutputWindowPlatform.h 
    13 src/InputWindow.h 
    14 src/Mediator.h 
    1518src/mil/include/mil/Atomic.h 
    1619src/mil/include/mil/Conditional.h 
     
    1922src/mil/include/mil/Environment.h 
    2023src/mil/include/mil/FilterException.h 
    21 src/mil/include/mil/gui-cocoa/Gui.h 
    22 src/mil/include/mil/gui-cocoa/GuiModule.h 
    23 src/mil/include/mil/gui-cocoa/GuiModuleObjC.h 
    24 src/mil/include/mil/gui-cocoa/PrecompiledHeaders.h 
    2524src/mil/include/mil/GuiModule.h 
    26 src/mil/include/mil/gui-windows/DummyMessageHandler-inl.h 
    27 src/mil/include/mil/gui-windows/Gui.h 
    28 src/mil/include/mil/gui-windows/GuiModule.h 
    29 src/mil/include/mil/gui-windows/MessageCracker-inl.h 
    30 src/mil/include/mil/gui-windows/PrecompiledHeaders.h 
    31 src/mil/include/mil/gui-windows/WindowProcedureRedirector.h 
    3225src/mil/include/mil/Intl.h 
    3326src/mil/include/mil/Memory.h 
     
    3831src/mil/include/mil/Mutex.h 
    3932src/mil/include/mil/ObjCExceptionFix.h 
     33src/mil/include/mil/Pool.h 
     34src/mil/include/mil/PrecompiledHeaders.h 
     35src/mil/include/mil/Semaphore.h 
     36src/mil/include/mil/Serial.h 
     37src/mil/include/mil/Synchronize.h 
     38src/mil/include/mil/Thread.h 
     39src/mil/include/mil/gui-cocoa/Gui.h 
     40src/mil/include/mil/gui-cocoa/GuiModule.h 
     41src/mil/include/mil/gui-cocoa/GuiModuleObjC.h 
     42src/mil/include/mil/gui-cocoa/PrecompiledHeaders.h 
     43src/mil/include/mil/gui-windows/DummyMessageHandler-inl.h 
     44src/mil/include/mil/gui-windows/Gui.h 
     45src/mil/include/mil/gui-windows/GuiModule.h 
     46src/mil/include/mil/gui-windows/MessageCracker-inl.h 
     47src/mil/include/mil/gui-windows/PrecompiledHeaders.h 
     48src/mil/include/mil/gui-windows/WindowProcedureRedirector.h 
    4049src/mil/include/mil/os-unix/Debug.h 
    4150src/mil/include/mil/os-unix/Os.h 
     
    4857src/mil/include/mil/os-windows/Sleep.h 
    4958src/mil/include/mil/os-windows/Thread.h 
    50 src/mil/include/mil/Pool.h 
    51 src/mil/include/mil/PrecompiledHeaders.h 
    52 src/mil/include/mil/Semaphore.h 
    53 src/mil/include/mil/Serial.h 
    54 src/mil/include/mil/Synchronize.h 
    55 src/mil/include/mil/Thread.h 
    5659src/mil/include/quicktest/quicktest.h 
    5760src/mil/include/xbyak/xbyak.h 
     
    6265src/os-unix/Os.h 
    6366src/os-unix/Pty.h 
     67src/os-windows/Os.h 
     68src/os-windows/Pty.h 
     69src/os-windows/Utf8ToUtf16Stream.h 
     70src/os-windows/WindowsCommon.h 
    6471src/os-windows/msvc/iconv.h 
    6572src/os-windows/msvc/libintl.h 
    66 src/os-windows/Os.h 
    67 src/os-windows/Pty.h 
    6873src/os-windows/resources/resource.h 
    69 src/os-windows/Utf8ToUtf16Stream.h 
    70 src/os-windows/WindowsCommon.h 
    7174src/os-windows/wlibintl.h 
    72 src/OutputWindow.h 
    73 src/ShellManager.h 
    74 src/Tester.h 
     75src/tests/Test.h 
     76src/tests/Tester.h 
    7577src/tests/no-test/Test.h 
    76 src/tests/Test.h 
    77 src/Version.h 
     78src/os-windows/PtyProcess.c 
    7879src/os-windows/msvc/win_iconv.c 
    79 src/os-windows/PtyProcess.c 
  • lang/objective-cplusplus/i3/trunk/src/Common.h

    r37528 r37559  
    99#include <mil/Mil.h> 
    1010#include <mil/Module.h> 
     11#include <mil/GuiModule.h> 
    1112#include <mil/Atomic.h> 
    1213#include <mil/Thread.h> 
  • lang/objective-cplusplus/i3/trunk/src/DebugEventHook.cc

    r37319 r37559  
    11#include <mil/PrecompiledHeaders.h> 
     2#include "Common.h" 
    23#include <mil/ModuleCommon.h> 
    34 
     
    67#include <boost/preprocessor/seq/fold_left.hpp> 
    78 
    8 char SIGN; 
     9static char SIGN; 
    910 
    1011#define RECEIVERS (InputWindow)(CompletionWindow)(OutputWindow)(ShellManager)(Delegate) 
  • lang/objective-cplusplus/i3/trunk/src/InputWindow.cc

    r37319 r37559  
    2121 
    2222#ifdef I3_TEST 
     23 
    2324I3_DEFINE_DEBUG_HOOK(InputWindow, SimplePing) { 
     25    debug << "input window hooked"; 
    2426    if (tester.getName() == "simple ping") { 
    2527        QT_CHECK(true); 
     
    2931 
    3032I3_DEFINE_DEBUG_HOOK(ShellManager, SimplePing2) { 
     33    debug << "shell manager hooked"; 
    3134    if (tester.getName() == "simple ping2") { 
    3235        QT_CHECK(true); 
     
    3437    } 
    3538} 
     39 
    3640#endif 
    3741 
  • lang/objective-cplusplus/i3/trunk/src/InputWindow.h

    r36862 r37559  
    11#pragma once 
    22 
    3 #include <mil/GuiModule.h> 
    4 #include <mil/DoubleBuffer.h> 
    53#include "Common.h" 
    64#include "InputWindowPlatform.h" 
     5#include <mil/DoubleBuffer.h> 
    76 
    87namespace i3 { 
  • lang/objective-cplusplus/i3/trunk/src/OutputWindow.h

    r36835 r37559  
    55 */ 
    66 
    7 #include <mil/GuiModule.h> 
    87#include "Common.h" 
    98#include "OutputWindowPlatform.h" 
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/CompletionWindowPlatform.h

    r34909 r37559  
    44 
    55#pragma once 
    6 #include <mil/GuiModule.h> 
    76#include "Common.h" 
    87 
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.h

    r36835 r37559  
    11#pragma once 
    22 
    3 #include <mil/GuiModule.h> 
    43#include "Common.h" 
    54 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Environment.h

    r37099 r37559  
    22 
    33// guess environment 
     4#define MIL_ENVIRONMENT_H_INCLUDED 1 
    45 
    56#ifdef HAVE_CONFIG_H 
  • lang/objective-cplusplus/i3/trunk/src/os-windows/Os.cc

    r37319 r37559  
    323323// 
    324324// ----------------------------------------------------------------- 
     325/* 
    325326//#ifndef _MSC_VER 
    326327#ifdef HAVE_POPT_H 
     
    569570} 
    570571#endif 
     572*/ 
  • lang/objective-cplusplus/i3/trunk/src/os-windows/wlibintl.h

    r37528 r37559  
    2525 
    2626/* wchar_t support */ 
     27 
     28//typedef wchar_t *WLIBINTL_H_RETURN_TYPE; 
     29typedef const wchar_t *WLIBINTL_H_RETURN_TYPE; 
     30 
    2731#ifdef _INTL_REDIRECT_INLINE 
    2832#define WLIBINTL_H_FUNCTION_LINKAGE static inline 
     
    4145 
    4246WLIBINTL_H_FUNCTION_LINKAGE  
    43 wchar_t *wgettext_selector (const char *msgid, const wchar_t *wmsgid) 
     47WLIBINTL_H_RETURN_TYPE 
     48wgettext_selector (const char *msgid, const wchar_t *wmsgid) 
    4449{ 
    4550  char *translated = gettext (msgid); 
    4651  if (strcmp(msgid, translated) == 0) 
    4752    { 
    48       return (wchar_t *)wmsgid; 
     53      return (WLIBINTL_H_RETURN_TYPE)wmsgid; 
    4954    } 
    50   return (wchar_t *)translated; 
     55  return (WLIBINTL_H_RETURN_TYPE)translated; 
    5156} 
    5257 
    5358WLIBINTL_H_FUNCTION_LINKAGE  
    54 wchar_t *dwgettext_selector (const char *domainname, const char *msgid, const wchar_t *wmsgid) 
     59WLIBINTL_H_RETURN_TYPE 
     60dwgettext_selector (const char *domainname, const char *msgid, const wchar_t *wmsgid) 
    5561{ 
    5662  char *translated = dgettext (domainname, msgid); 
    5763  if (strcmp(msgid, translated) == 0) 
    5864    { 
    59       return (wchar_t *)wmsgid; 
     65      return (WLIBINTL_H_RETURN_TYPE)wmsgid; 
    6066    } 
    61   return (wchar_t *)translated; 
     67  return (WLIBINTL_H_RETURN_TYPE)translated; 
    6268} 
    6369 
    6470WLIBINTL_H_FUNCTION_LINKAGE  
    65 wchar_t *dcwgettext_selector (const char *domainname, const char *msgid, int category,  const wchar_t *wmsgid) 
     71WLIBINTL_H_RETURN_TYPE 
     72dcwgettext_selector (const char *domainname, const char *msgid, int category,  const wchar_t *wmsgid) 
    6673{ 
    6774  char *translated = dcgettext (domainname, msgid, category); 
    6875  if (strcmp(msgid, translated) == 0) 
    6976    { 
    70       return (wchar_t *)wmsgid; 
     77      return (WLIBINTL_H_RETURN_TYPE)wmsgid; 
    7178    } 
    72   return (wchar_t *)translated; 
     79  return (WLIBINTL_H_RETURN_TYPE)translated; 
    7380} 
    7481 
    7582WLIBINTL_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) 
     83WLIBINTL_H_RETURN_TYPE 
     84nwgettext_selector (const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2) 
    7785{ 
    7886  char *translated = ngettext (msgid1, msgid2, n); 
    7987  if (strcmp(msgid1, translated) == 0) 
    8088    { 
    81       return (wchar_t *)wmsgid1; 
     89      return (WLIBINTL_H_RETURN_TYPE)wmsgid1; 
    8290    } 
    8391  else if (strcmp(msgid2, translated) == 0) 
    8492    { 
    85       return (wchar_t *)wmsgid2; 
     93      return (WLIBINTL_H_RETURN_TYPE)wmsgid2; 
    8694    } 
    87   return (wchar_t *)translated; 
     95  return (WLIBINTL_H_RETURN_TYPE)translated; 
    8896} 
    8997 
    9098WLIBINTL_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) 
     99WLIBINTL_H_RETURN_TYPE 
     100dnwgettext_selector (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2) 
    92101{ 
    93102  char *translated = dngettext (domainname, msgid1, msgid2, n); 
    94103  if (strcmp(msgid1, translated) == 0) 
    95104    { 
    96       return (wchar_t *)wmsgid1; 
     105      return (WLIBINTL_H_RETURN_TYPE)wmsgid1; 
    97106    } 
    98107  else if (strcmp(msgid2, translated) == 0) 
    99108    { 
    100       return (wchar_t *)wmsgid2; 
     109      return (WLIBINTL_H_RETURN_TYPE)wmsgid2; 
    101110    } 
    102   return (wchar_t *)translated; 
     111  return (WLIBINTL_H_RETURN_TYPE)translated; 
    103112} 
    104113 
    105114WLIBINTL_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) 
     115WLIBINTL_H_RETURN_TYPE 
     116dcnwgettext_selector (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2, int category) 
    107117{ 
    108118  char *translated = dcngettext (domainname, msgid1, msgid2, n, category); 
    109119  if (strcmp(msgid1, translated) == 0) 
    110120    { 
    111       return (wchar_t *)wmsgid1; 
     121      return (WLIBINTL_H_RETURN_TYPE)wmsgid1; 
    112122    } 
    113123  else if (strcmp(msgid2, translated) == 0) 
    114124    { 
    115       return (wchar_t *)wmsgid2; 
     125      return (WLIBINTL_H_RETURN_TYPE)wmsgid2; 
    116126    } 
    117   return (wchar_t *)translated; 
     127  return (WLIBINTL_H_RETURN_TYPE)translated; 
    118128} 
    119129 
  • lang/objective-cplusplus/i3/trunk/src/tests/Test.h

    r37326 r37559  
    11#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 
    28#define I3_TEST 1 
    39 
    4  
  • lang/objective-cplusplus/i3/trunk/src/tests/TestEvent.cc

    r37319 r37559  
    5252    t.mediator.getInputWindow().post(f, t); 
    5353    sleep(1); 
    54  
    5554    t.sendKeys("foo\n"); 
    5655} 
  • lang/objective-cplusplus/i3/trunk/src/tests/TestNLS.cc

    r37491 r37559  
    2020namespace ns_intrusrangaaaaaaaaa { 
    2121 
    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 #endif 
    40  
    4122#ifdef ENABLE_NLS 
     23 
     24QT_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} 
    4293 
    4394void dump_string(const TCHAR* str) { 
     
    103154        my_setenv(env_list[i], locale); 
    104155    } 
    105      
     156 
    106157    setlocale(LC_ALL, locale); 
    107  
    108158    textdomain(PACKAGE_NAME); 
     159 
    109160    return 0; 
    110161} 
     
    184235    check_translation("Hello, world!", _T("Hello, world!")); 
    185236 
     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 
    186243    QT_CHECK_NOT_EQUAL(set_locale("ja_JP" JA_ENCODING), -1); 
    187244    check_translation("Hello, world!", hello_world_ja); 
    188245 
    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!")); 
    191254 
    192255    QT_CHECK_NOT_EQUAL(set_locale("de"), -1); 
    193256    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!")); 
    206257} 
    207258 
  • lang/objective-cplusplus/i3/trunk/unix/am/i3_test.am

    r37454 r37559  
    33i3_test_SOURCES = $(i3_SOURCES_NO_MAIN) \ 
    44src/mil/src/test/Main.cc \ 
    5 src/Tester.cc \ 
     5src/tests/Tester.cc \ 
    66src/tests/TestNLS.cc \ 
    77src/tests/TestConfigFile.cc \ 
     
    1818i3_test_LDADD    += libmilobjcexceptionfilter.a 
    1919endif 
    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"?> 
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    33  <ItemGroup Label="ProjectConfigurations"> 
     
    105105    <ClCompile Include="..\src\OutputWindow.cc" /> 
    106106    <ClCompile Include="..\src\ShellManager.cc" /> 
    107     <ClCompile Include="..\src\Tester.cc" /> 
     107    <ClCompile Include="..\src\tests\Tester.cc" /> 
    108108    <ClCompile Include="..\src\tests\TestConfigFile.cc" /> 
    109109    <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"?> 
    22<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    33  <ItemGroup> 
     
    4646      <Filter>Source Files</Filter> 
    4747    </ClCompile> 
    48     <ClCompile Include="..\src\Tester.cc"> 
     48    <ClCompile Include="..\src\tests\Tester.cc"> 
    4949      <Filter>Source Files</Filter> 
    5050    </ClCompile>