Changeset 30765 for lang/cplusplus

Show
Ignore:
Timestamp:
03/04/09 06:17:51 (5 years ago)
Author:
saturday06
Message:

tuyiop@@

Location:
lang/cplusplus/i3/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/i3/trunk/am/i3.am

    r30750 r30765  
    5555i3_SOURCES_NO_MAIN += \ 
    5656src/os-windows/WindowsCommon.cpp \ 
    57 src/os-windows/CygwinPty.cpp 
    58 if ENABLE_WINDOWS_UNICODE 
     57src/os-windows/CygwinPty.cpp \ 
     58src/os-windows/Utf8ToUtf16Stream.cpp 
     59if WITH_GUI_WINDOWS 
    5960i3_CXXFLAGS_DEFAULT += -DUNICODE -D_UNICODE 
    6061endif 
  • lang/cplusplus/i3/trunk/configure.ac

    r30763 r30765  
    107107AC_SUBST(GUI_DIR) 
    108108 
    109 AC_ARG_ENABLE(windows-unicode, 
    110     AS_HELP_STRING([--disable-windows-unicode], [UNICODE build]), 
    111         enable_windows_unicode="$enableval", enable_windows_unicode="yes") 
    112 AM_CONDITIONAL(ENABLE_WINDOWS_UNICODE, test "$enable_windows_unicode" = "yes") 
     109#AC_ARG_ENABLE(windows-unicode, 
     110#    AS_HELP_STRING([--enable-windows-unicode], [UNICODE build]), 
     111#        enable_windows_unicode="$enableval", enable_windows_unicode="no") 
     112#AM_CONDITIONAL(ENABLE_WINDOWS_UNICODE, test "$enable_windows_unicode" = "yes") 
    113113 
    114114AM_CONDITIONAL(WITH_CYGWIN,      test "$with_cygwin" = "yes") 
  • lang/cplusplus/i3/trunk/src/os-windows/Os.cpp

    r30462 r30765  
    11#include <PrecompiledHeaders.h> 
    22#include "Common.h" 
     3#include <malloc.h> 
    34 
    45namespace i3 
     
    141142 
    142143#ifdef HAVE_POPT_H 
     144#if defined(UNICODE) || defined(_UNICODE) 
    143145    return check_args(); 
     146#else 
     147    return execute_popt(argc, argv, boost::lambda::constant(stdout)); 
     148#endif 
    144149#endif 
    145150    return 0; 
     
    174179//#ifndef _MSC_VER 
    175180#ifdef HAVE_POPT_H 
    176 #include <boost/spirit.hpp> 
     181#include <boost/spirit/include/classic.hpp> 
    177182#include <boost/bind.hpp> 
    178183#include "Utf8ToUtf16Stream.h" 
    179184 
    180 using namespace boost::spirit; 
     185using namespace boost::spirit::classic; 
    181186 
    182187namespace i3 
     
    246251{ 
    247252    calc2 c(cleaned); 
    248     parse_info<> r = boost::spirit::parse(got, c); 
     253    parse_info<> r = boost::spirit::classic::parse(got, c); 
    249254} 
    250255 
     
    333338exit_status check_args2(int argc, char** argv) 
    334339{ 
    335 #if !(defined(UNICODE) || defined(_UNICODE)) 
    336     const char* codeset = bind_textdomain_codeset(PACKAGE_NAME,NULL); 
    337 #endif 
    338  
    339     bind_textdomain_codeset(PACKAGE_NAME,"UTF-8"); 
    340  
     340#if defined(UNICODE) || defined(_UNICODE) 
    341341    Utf8ToUtf16Stream s(stderr); 
    342342    struct fp_func fp_func = {s}; 
    343  
    344     exit_status e = i3::execute_popt(argc, argv, fp_func); 
    345  
    346 #if defined(UNICODE) || defined(_UNICODE) 
     343    bind_textdomain_codeset(PACKAGE_NAME,"UTF-8"); 
     344    exit_status e = i3::execute_popt((size_t)argc, (const char**)argv, fp_func); 
    347345    bind_textdomain_codeset(PACKAGE_NAME,"UTF-16LE"); 
    348346#else 
     347    const char* codeset = bind_textdomain_codeset(PACKAGE_NAME,NULL); 
     348    bind_textdomain_codeset(PACKAGE_NAME,"UTF-8"); 
     349    exit_status e = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout)); 
    349350    bind_textdomain_codeset(PACKAGE_NAME,codeset); 
    350351#endif 
     
    354355} 
    355356 
     357 
     358#if defined(UNICODE) || defined(_UNICODE) 
    356359exit_status check_args() 
    357360{ 
    358     using namespace i3::windows_execute_argtable; 
     361    using namespace i3::windows_execute_popt; 
    359362 
    360363    // -------------------------------------------- 
     
    443446    return check_args2(argc, argv); 
    444447} 
    445  
    446 } 
    447 #endif 
     448#endif 
     449 
     450} 
     451#endif 
  • lang/cplusplus/i3/trunk/src/os-windows/Utf8ToUtf16Stream.cpp

    r27043 r30765  
    22#include "../Common.h" 
    33#include "Utf8ToUtf16Stream.h" 
     4#include <malloc.h> 
    45 
    56namespace i3