Changeset 35519

Show
Ignore:
Timestamp:
10/07/09 23:18:57 (4 years ago)
Author:
saturday06
Message:

命の火

Location:
lang/objective-cplusplus/i3/trunk
Files:
1 added
10 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/Makefile.am

    r35295 r35519  
    55bin_PROGRAMS    = i3 
    66CLEANFILES      = *.gcno po/stamp-po #XXXpo/stamp-po!? 
    7 DISTCLEANFILES  =  
     7DISTCLEANFILES  = 
    88BUILT_SOURCES   = 
    9 DISTCHECK_CONFIGURE_FLAGS = --disable-nls 
     9DISTCHECK_CONFIGURE_FLAGS = 
    1010 
    1111if ENABLE_DEBUG 
     
    6969# copy locale file for windows 
    7070windows-locale: 
    71         perl windows/locale.pl ${PACKAGE_NAME} 
     71        perl windows/locale.pl i3 
    7272 
    7373if WITH_OS_WINDOWS 
  • lang/objective-cplusplus/i3/trunk/configure.ac

    r35492 r35519  
    33 
    44AC_PREREQ(2.60) 
    5  
    6 #AC_INIT([i3], [0.1alpha], [dyob@lunaport.net]) 
    75AC_INIT([i3], m4_esyscmd([./scripts/ac_init_version.sh | tr -d '\r\n']), [dyob@lunaport.net]) 
    86 
     
    3028#              enable_debug="no" 
    3129              enable_debug="yes" 
    32              ) 
     30                           ) 
    3331AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes") 
    3432if test "$enable_debug" = "yes"; then 
  • lang/objective-cplusplus/i3/trunk/src/Common.h

    r35451 r35519  
    108108#endif 
    109109 
    110 #define UTF8_TO_UTF16LE_ALLOCA(data8, data16) \ 
    111     wchar_t* data16 = NULL; \ 
    112     for (;;) { \ 
    113         const char* check = data8; check; \ 
     110#define UTF8_TO_UTF16LE_ALLOCA(data8, data16)                           \ 
     111    wchar_t* data16 = NULL;                                             \ 
     112    for (;;) {                                                          \ 
     113        const char* check = data8; check;                               \ 
    114114        unsigned int num_elements = MultiByteToWideChar(CP_UTF8, 0, data8, -1, NULL, 0); \ 
    115         if (num_elements == 0) { \ 
    116             break; \ 
    117         } \ 
    118         const size_t data16_bytes = num_elements*sizeof(wchar_t); \ 
    119         if (data16_bytes > _ALLOCA_S_THRESHOLD) { \ 
    120             data16 = NULL; \ 
    121             break; \ 
    122         } \ 
    123         __try { \ 
    124             data16 = (wchar_t*)alloca(data16_bytes); \ 
    125         } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ? \ 
    126                         EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { \ 
    127             data16 = NULL; \ 
    128             break; \ 
    129             } \ 
     115        if (num_elements == 0) {                                        \ 
     116            break;                                                      \ 
     117        }                                                               \ 
     118        const size_t data16_bytes = num_elements*sizeof(wchar_t);       \ 
     119        if (data16_bytes > _ALLOCA_S_THRESHOLD) {                       \ 
     120            data16 = NULL;                                              \ 
     121            break;                                                      \ 
     122        }                                                               \ 
     123        __try {                                                         \ 
     124            data16 = (wchar_t*)alloca(data16_bytes);                    \ 
     125        } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ?       \ 
     126                    EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { \ 
     127            data16 = NULL;                                              \ 
     128            break;                                                      \ 
     129            }                                                               \ 
    130130        if (0 == MultiByteToWideChar(CP_UTF8, 0, data8, -1, data16, num_elements)) { \ 
    131             data16 = NULL; \ 
    132             break; \ 
    133         } \ 
    134         break; \ 
    135     } 
    136  
    137 #define UTF16LE_TO_UTF8_ALLOCA(data16, data8) \ 
    138     char* data8 = NULL; \ 
    139     for (;;) { \ 
    140         const wchar_t* check = data16; check; \ 
     131            data16 = NULL;                                              \ 
     132            break;                                                      \ 
     133        }                                                               \ 
     134        break;                                                          \ 
     135    } 
     136 
     137#define UTF16LE_TO_UTF8_ALLOCA(data16, data8)                           \ 
     138    char* data8 = NULL;                                                 \ 
     139    for (;;) {                                                          \ 
     140        const wchar_t* check = data16; check;                           \ 
    141141        unsigned int num_elements = WideCharToMultiByte( CP_UTF8, 0, data16, -1, NULL, 0, 0, 0); \ 
    142         if (num_elements == 0 || num_elements > _ALLOCA_S_THRESHOLD) { \ 
    143             break; \ 
    144         } \ 
    145         __try { \ 
    146             data8 = (char*)alloca(num_elements*sizeof(char)); \ 
    147         } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ? \ 
    148                         EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { \ 
    149             data8 = NULL; \ 
    150             break; \ 
    151             } \ 
     142        if (num_elements == 0 || num_elements > _ALLOCA_S_THRESHOLD) {  \ 
     143            break;                                                      \ 
     144        }                                                               \ 
     145        __try {                                                         \ 
     146            data8 = (char*)alloca(num_elements*sizeof(char));           \ 
     147        } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ?       \ 
     148                    EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { \ 
     149            data8 = NULL;                                               \ 
     150            break;                                                      \ 
     151            }                                                               \ 
    152152        if (0 == WideCharToMultiByte(CP_UTF8, 0, data16, -1, data8, num_elements, 0, 0)) { \ 
    153             data8 = NULL; \ 
    154             break; \ 
    155         } \ 
    156         break; \ 
     153            data8 = NULL;                                               \ 
     154            break;                                                      \ 
     155        }                                                               \ 
     156        break;                                                          \ 
    157157    } 
    158158 
     
    163163#ifndef HAVE_POPT_H 
    164164namespace i3 { 
    165 template <typename FP_FUNC> 
    166 inline static exit_status execute_popt( 
    167     size_t argc, char** argv, FP_FUNC fp) { 
     165template <typename FP_FUNCTER> 
     166inline static exit_status execute_popt(int argc, char** argv, FP_FUNCTER fp) { 
    168167    return 0; 
    169168} 
     
    172171namespace i3 { 
    173172 
    174 template <typename FP_FUNC> 
    175 int usage(poptContext optCon, int exitcode, const char *error, const char *addl, FP_FUNC fp) { 
     173template <typename FP_FUNCTER> 
     174int usage(poptContext optCon, int exitcode, const char *error, const char *addl, FP_FUNCTER fp) { 
    176175    poptPrintUsage(optCon, fp(), 0); 
    177176    if (error) { 
     
    181180} 
    182181 
    183 template <typename FP_FUNC> 
    184 inline static exit_status execute_popt(size_t argc, char** argv, FP_FUNC fp) { 
     182template <typename FP_FUNCTER> 
     183inline static exit_status execute_popt(int argc, char** argv, FP_FUNCTER fp) { 
    185184    int c;            /* used for argument parsing */ 
    186185    int i = 0;        /* used for tracking options */ 
     
    189188    int version = 0; 
    190189    int j; 
    191     char buf[BUFSIZ+1]; 
     190    char buf[BUFSIZ + 1]; 
    192191    poptContext optCon;   /* context for parsing command-line options */ 
    193192 
     
    203202        { "swflow",   's',         0,            0,      's',     "use software (XON/XOF) flow control" } , 
    204203        POPT_AUTOHELP 
    205         { "aswflow",   'x',         0,            0,      'x',     "XXXXXXXXXXXXXXXXXXXXXX" } , 
     204        { "aswflow",   'x',        0,            0,      'x',     "XXXXXXXXXXXXXXXXXXXXXX" } , 
    206205        { NULL, 0, 0, NULL, 0 } 
    207206    }; 
    208207    /* 
    209     $ a.out --help 
    210  
    211     Usage: a.out [OPTIONS]* 
    212     -b, --bps=BPS   signaling rate in bits-per-second 
    213     -c, --crnl      expand cr characters to cr/lf sequences 
    214     -h, --hwflow    use hardware (RTS/CTS) flow control 
    215     -n, --noflow    use no flow control 
    216     -r, --raw       don't perform any character conversions 
    217     -s, --swflow    use software (XON/XOF) flow control 
    218  
    219     Help options 
    220     -?, --help      Show this help message 
    221     --usage         Display brief usage message 
     208      $ a.out --help 
     209 
     210      Usage: a.out [OPTIONS]* 
     211      -b, --bps=BPS   signaling rate in bits-per-second 
     212      -c, --crnl      expand cr characters to cr/lf sequences 
     213      -h, --hwflow    use hardware (RTS/CTS) flow control 
     214      -n, --noflow    use no flow control 
     215      -r, --raw       don't perform any character conversions 
     216      -s, --swflow    use software (XON/XOF) flow control 
     217 
     218      Help options 
     219      -?, --help      Show this help message 
     220      --usage         Display brief usage message 
    222221    */ 
    223222 
    224223    const char** argv2 = const_cast<const char**>(argv); 
    225  
    226224    optCon = poptGetContext(NULL, argc, argv2, optionsTable, 0); 
    227225    poptSetOtherOptionHelp(optCon, "[OPTIONS]* <port>"); 
     
    290288 
    291289    /* 
    292     struct arg_lit  *list    = arg_lit0("lL",NULL,                      gettext("list files")); 
    293     struct arg_lit  *recurse = arg_lit0("R",NULL,                       gettext("recurse through subdirectories")); 
    294     struct arg_int  *repeat  = arg_int0("k","scalar",NULL,              gettext("define scalar value k (default is 3)")); 
    295     struct arg_str  *defines = arg_strn("D","define","MACRO",0,argc+2,  gettext("macro definitions")); 
    296     struct arg_file *outfile = arg_file0("o",NULL,"<output>",           gettext("output file (default is \"-\")")); 
    297     struct arg_lit  *verbose = arg_lit0("v","verbose,debug",            gettext("verbose messages")); 
    298     struct arg_lit  *help    = arg_lit0(NULL,"help",                    gettext("print this help and exit")); 
    299     struct arg_lit  *version = arg_lit0(NULL,"version",                 gettext("print version information and exit")); 
    300     //struct arg_file *infiles = arg_filen(NULL,NULL,NULL,1,argc+2,       "input file(s)"); 
    301     struct arg_end  *end     = arg_end(20); 
    302     //void* argtable[] = {list,recurse,repeat,defines,outfile,verbose,help,version,infiles,end}; 
    303     void* argtable[] = {list,recurse,repeat,defines,outfile,verbose,help,version,end}; 
    304     int nerrors = 0; 
    305  
    306  
    307     // verify the argtable[] entries were allocated sucessfully 
    308     if (arg_nullcheck(argtable) != 0) 
    309     { 
    310         // NULL entries were detected, some allocations must have failed 
    311         fprintf(fp(), PACKAGE_NAME ": insufficient memory\n"); 
    312         goto error_exit; 
    313     } 
    314  
    315     // set any command line default values prior to parsing 
    316     repeat->ival[0]=3; 
    317     outfile->filename[0]="-"; 
    318  
    319     // Parse the command line as defined by argtable[] 
    320     nerrors = arg_parse(argc,argv,argtable); 
    321  
    322     // special case: '--help' takes precedence over error reporting 
    323     if (help->count > 0) 
    324     { 
    325         arg_print_syntax(fp(),argtable,"\n"); 
    326         arg_print_glossary(fp(),argtable,"  %-25s %s\n"); 
    327         goto normal_exit; 
    328     } 
    329  
    330     // special case: '--version' takes precedence error reporting 
    331     if (version->count > 0) 
    332     { 
    333         fprintf(fp(), PACKAGE_NAME " version " PACKAGE_VERSION "\n"); 
    334         goto normal_exit; 
    335     } 
    336  
    337     // If the parser returned any errors then display them and exit 
    338     if (nerrors > 0) 
    339     { 
    340         // Display the error details contained in the arg_end struct. 
    341         arg_print_errors(fp(), end, PACKAGE_NAME); 
    342         goto error_exit; 
    343     } 
    344  
    345     // normal case: take the command line options at face value 
    346     //    exitcode = mymain(list->count, recurse->count, repeat->ival[0], 
    347     //                      defines->sval, defines->count, 
    348     //                      outfile->filename[0], verbose->count, 
    349     //                      infiles->filename, infiles->count); 
    350  
    351  
    352     arg_freetable(argtable, _countof(argtable)); 
    353     return 0; 
    354     normal_exit: 
    355     arg_freetable(argtable, _countof(argtable)); 
    356     return exit_status::exit_when_special_argument(); 
    357     error_exit: 
    358     arg_freetable(argtable, _countof(argtable)); 
     290      struct arg_lit  *list    = arg_lit0("lL",NULL,                      gettext("list files")); 
     291      struct arg_lit  *recurse = arg_lit0("R",NULL,                       gettext("recurse through subdirectories")); 
     292      struct arg_int  *repeat  = arg_int0("k","scalar",NULL,              gettext("define scalar value k (default is 3)")); 
     293      struct arg_str  *defines = arg_strn("D","define","MACRO",0,argc+2,  gettext("macro definitions")); 
     294      struct arg_file *outfile = arg_file0("o",NULL,"<output>",           gettext("output file (default is \"-\")")); 
     295      struct arg_lit  *verbose = arg_lit0("v","verbose,debug",            gettext("verbose messages")); 
     296      struct arg_lit  *help    = arg_lit0(NULL,"help",                    gettext("print this help and exit")); 
     297      struct arg_lit  *version = arg_lit0(NULL,"version",                 gettext("print version information and exit")); 
     298      //struct arg_file *infiles = arg_filen(NULL,NULL,NULL,1,argc+2,       "input file(s)"); 
     299      struct arg_end  *end     = arg_end(20); 
     300      //void* argtable[] = {list,recurse,repeat,defines,outfile,verbose,help,version,infiles,end}; 
     301      void* argtable[] = {list,recurse,repeat,defines,outfile,verbose,help,version,end}; 
     302      int nerrors = 0; 
     303 
     304 
     305      // verify the argtable[] entries were allocated sucessfully 
     306      if (arg_nullcheck(argtable) != 0) 
     307      { 
     308      // NULL entries were detected, some allocations must have failed 
     309      fprintf(fp(), PACKAGE_NAME ": insufficient memory\n"); 
     310      goto error_exit; 
     311      } 
     312 
     313      // set any command line default values prior to parsing 
     314      repeat->ival[0]=3; 
     315      outfile->filename[0]="-"; 
     316 
     317      // Parse the command line as defined by argtable[] 
     318      nerrors = arg_parse(argc,argv,argtable); 
     319 
     320      // special case: '--help' takes precedence over error reporting 
     321      if (help->count > 0) 
     322      { 
     323      arg_print_syntax(fp(),argtable,"\n"); 
     324      arg_print_glossary(fp(),argtable,"  %-25s %s\n"); 
     325      goto normal_exit; 
     326      } 
     327 
     328      // special case: '--version' takes precedence error reporting 
     329      if (version->count > 0) 
     330      { 
     331      fprintf(fp(), PACKAGE_NAME " version " PACKAGE_VERSION "\n"); 
     332      goto normal_exit; 
     333      } 
     334 
     335      // If the parser returned any errors then display them and exit 
     336      if (nerrors > 0) 
     337      { 
     338      // Display the error details contained in the arg_end struct. 
     339      arg_print_errors(fp(), end, PACKAGE_NAME); 
     340      goto error_exit; 
     341      } 
     342 
     343      // normal case: take the command line options at face value 
     344      //    exitcode = mymain(list->count, recurse->count, repeat->ival[0], 
     345      //                      defines->sval, defines->count, 
     346      //                      outfile->filename[0], verbose->count, 
     347      //                      infiles->filename, infiles->count); 
     348 
     349 
     350      arg_freetable(argtable, _countof(argtable)); 
     351      return 0; 
     352      normal_exit: 
     353      arg_freetable(argtable, _countof(argtable)); 
     354      return exit_status::exit_when_special_argument(); 
     355      error_exit: 
     356      arg_freetable(argtable, _countof(argtable)); 
    359357    */ 
    360358    return 1; 
  • lang/objective-cplusplus/i3/trunk/src/Test2.cpp

    r35492 r35519  
    88using namespace mil; 
    99using namespace i3; 
    10  
    11  
    12 QT_TEST(test_configboostpp) { 
    13     //c.b = reinterpret_cast<decltype(c.b)>(&c); 
    14     //QT_CHECK((Config*)(decltype(c.b))(&c) == &c); 
    15  
    16     using namespace std; 
    17 } 
    18  
    19  
    20 QT_TEST(test_configboostasiodfj) { 
    21  
    22 } 
    2310 
    2411QT_TEST(test_basic_tcscat_s) { 
     
    3522 
    3623#ifdef MIL_OS_WINDOWS 
    37         i3::string cmd = i3::string() + _T("md \"") + os.config_dir + _T("\" 2> nul"); 
     24    i3::string cmd = i3::string() + _T("md \"") + os.config_dir + _T("\" 2> nul"); 
    3825#else 
    3926    i3::string cmd = i3::string() + _T("mkdir -p ") + os.config_dir + _T(" 2> /dev/null"); 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/ModuleCommon.h

    r35492 r35519  
    132132protected: 
    133133        struct TMemory { 
    134                 union { 
    135                         mil::thread::id_t owner_id; 
    136                         mil::thread::id_t size_if_msb_on; 
    137                 }; 
     134                void setMalloced() { 
     135                        owner_id_if_msb_off |= (1 << (sizeof(owner_id_if_msb_off) * 8 - 1)); 
     136                } 
     137                bool isMalloced() { 
     138                        return owner_id_if_msb_off & (1 << (sizeof(owner_id_if_msb_off) * 8 - 1)); 
     139                } 
     140        private: 
     141                mil::thread::id_t owner_id_if_msb_off; 
    138142        }; 
    139143        void* tmalloc(size_t size) { 
     
    141145                if ((size + sizeof(TMemory)) <= mil::pool::BLOCK_SIZE) { 
    142146                        tmemory = (TMemory*)tls.producer.malloc<mil::pool::BLOCK_SIZE>(); 
    143                         tmemory->owner_id = this->thread_id; 
     147                        tmemory->owner_id_if_msb_off = this->thread_id; 
    144148                } else { 
    145149                        tmemory = (TMemory*)malloc(size + sizeof(TMemory)); 
    146                         tmemory->size_if_msb_on = size + sizeof(TMemory); 
    147                         tmemory->size_if_msb_on |= 0x80000000; 
     150                        tmemory->setMalloced(); 
    148151                } 
    149152                return (void*)(((TMemory*)tmemory) + 1); 
     
    151154        void tfree(void* memory) { 
    152155                TMemory* tmemory = (((TMemory*)memory) - 1); 
    153                 if (tmemory->size_if_msb_on & 0x80000000) { 
     156                if (tmemory->isMalloced()) { 
    154157                        free(tmemory); 
    155158                        return; 
    156159                } 
    157                 if (tmemory->owner_id == this->thread_id) { 
     160                if (tmemory->owner_id_if_msb_off == this->thread_id) { 
    158161                        tls.producer.free((void*)tmemory, 1); 
    159162                        return; 
  • lang/objective-cplusplus/i3/trunk/src/os-windows/Pty.cpp

    r35492 r35519  
    4242Pty::~Pty() { 
    4343    //interrupt(); 
    44     write("exit\r\n"); 
    45     write("\004" 
    46           "\004" 
    47           "\003" 
    48           "\003" 
    49           "\004" 
    50           "\004" 
    51           "\003" 
    52           "\003" 
    53           "\r\n"); 
     44        for (int i = 0; i < 3; i++) { 
     45                write( 
     46                        "\r\n" 
     47                        "\r\n" 
     48                        "\004" 
     49                        "\003" 
     50                        "exit\r\n" 
     51                        "logout\r\n" 
     52                        "\r\n" 
     53                        ); 
     54        } 
     55        TerminateProcess(pi.hProcess, 0); 
    5456} 
    5557 
     
    7072 
    7173bool Pty::interrupt() { 
     74        // write("\003", 1); 
    7275    BOOL result = GenerateConsoleCtrlEvent(CTRL_C_EVENT, pi.dwProcessId); 
    7376    return (result != 0); 
    74     //return write("\003", 1); 
    7577} 
    7678 
     
    99101    CreatePipe(&hMyStdError  , &hStdError   , &sa, 0); 
    100102 
    101     HANDLE cp = GetCurrentProcess(); 
    102     if (!DuplicateHandle(cp, hMyStdInput , cp, NULL, 0, FALSE, DUPLICATE_SAME_ACCESS) || 
    103         !DuplicateHandle(cp, hMyStdOutput, cp, NULL, 0, FALSE, DUPLICATE_SAME_ACCESS) || 
    104         !DuplicateHandle(cp, hMyStdError , cp, NULL, 0, FALSE, DUPLICATE_SAME_ACCESS)) { 
    105  
    106         return false; 
    107     } 
     103    //HANDLE cp = GetCurrentProcess(); 
     104    //if (!DuplicateHandle(cp, hMyStdInput , cp, NULL, 0, FALSE, DUPLICATE_SAME_ACCESS) || 
     105    //    !DuplicateHandle(cp, hMyStdOutput, cp, NULL, 0, FALSE, DUPLICATE_SAME_ACCESS) || 
     106    //    !DuplicateHandle(cp, hMyStdError , cp, NULL, 0, FALSE, DUPLICATE_SAME_ACCESS)) { 
     107    //    return false; 
     108    //} 
    108109 
    109110    si.cb = sizeof(STARTUPINFO); 
     
    120121            return false; 
    121122        } 
    122         //if (_tcscat_s(arguments, _T(" /bin/sh --login -i")) != 0) { 
    123         //if (_tcscat_s(arguments, _T(" /bin/sh -c echo foo")) != 0) { 
    124         //    return false; 
    125         //} 
    126123        if (_tcscat_s(pty, _T(" /bin/sh -l")) != 0) { 
    127124            return false; 
    128125        } 
    129         //TCHAR arguments[] = _T("fakecygpty /bin/sh --login -i"); 
    130126        DWORD dwCreationFlags = 0; 
    131127        if (os.osversioninfo.dwPlatformId == VER_PLATFORM_WIN32_NT) { 
     
    134130        BOOL result = CreateProcess(NULL, pty, NULL, NULL, TRUE, dwCreationFlags, NULL, cd, &si, &pi); 
    135131        if (result == 0) { 
    136                         //MessageBox(NULL, _T("createprocess"), _T("cp"), MB_OK); 
    137132            return false; 
    138133        } 
     
    142137 
    143138bool Pty::connect() { 
    144     return connectInterix(); 
     139    //return connectInterix(); 
     140        return connectCygwin(); 
    145141} 
    146142 
  • lang/objective-cplusplus/i3/trunk/windows/mil_test.vcproj

    r35451 r35519  
    997997                        </File> 
    998998                        <File 
     999                                RelativePath="..\src\mil\include\mil\Debug.h" 
     1000                                > 
     1001                        </File> 
     1002                        <File 
    9991003                                RelativePath="..\src\mil\include\mil\os-windows\Debug.h" 
    10001004                                > 
    10011005                        </File> 
    10021006                        <File 
    1003                                 RelativePath="..\src\mil\include\mil\Debug.h" 
    1004                                 > 
    1005                         </File> 
    1006                         <File 
    10071007                                RelativePath="..\src\mil\include\mil\gui-windows\DummyMessageHandler-inl.h" 
    10081008                                > 
     
    10171017                        </File> 
    10181018                        <File 
     1019                                RelativePath="..\src\mil\include\mil\GuiModule.h" 
     1020                                > 
     1021                        </File> 
     1022                        <File 
    10191023                                RelativePath="..\src\mil\include\mil\gui-windows\GuiModule.h" 
    10201024                                > 
    10211025                        </File> 
    10221026                        <File 
    1023                                 RelativePath="..\src\mil\include\mil\GuiModule.h" 
    1024                                 > 
    1025                         </File> 
    1026                         <File 
    10271027                                RelativePath="..\src\mil\include\mil\Memory.h" 
    10281028                                > 
     
    10531053                        </File> 
    10541054                        <File 
     1055                                RelativePath="..\src\mil\include\mil\gui-windows\PrecompiledHeaders.h" 
     1056                                > 
     1057                        </File> 
     1058                        <File 
     1059                                RelativePath="..\src\mil\include\mil\os-windows\PrecompiledHeaders.h" 
     1060                                > 
     1061                        </File> 
     1062                        <File 
    10551063                                RelativePath="..\src\mil\include\mil\PrecompiledHeaders.h" 
    10561064                                > 
    10571065                        </File> 
    10581066                        <File 
    1059                                 RelativePath="..\src\mil\include\mil\gui-windows\PrecompiledHeaders.h" 
    1060                                 > 
    1061                         </File> 
    1062                         <File 
    1063                                 RelativePath="..\src\mil\include\mil\os-windows\PrecompiledHeaders.h" 
    1064                                 > 
    1065                         </File> 
    1066                         <File 
    10671067                                RelativePath="..\src\mil\include\quicktest\quicktest.h" 
    10681068                                > 
     
    10851085                        </File> 
    10861086                        <File 
     1087                                RelativePath="..\src\mil\include\mil\os-windows\Thread.h" 
     1088                                > 
     1089                        </File> 
     1090                        <File 
    10871091                                RelativePath="..\src\mil\include\mil\Thread.h" 
    1088                                 > 
    1089                         </File> 
    1090                         <File 
    1091                                 RelativePath="..\src\mil\include\mil\os-windows\Thread.h" 
    10921092                                > 
    10931093                        </File> 
  • lang/objective-cplusplus/i3/trunk/windows/pty/compile.sh

    r35400 r35519  
    99 
    1010target=${host}.exe 
    11 rm -f ${target} ${target}.bz2 
    12 gcc -O3 -s -DNDEBUG -Wall -W -o ${target} pty.c 
     11rm -f ${target} ${target}.gz 
     12gcc -O3 -s -DNDEBUG -Wall -Wextra -o ${target} pty.c 
    1313 
    1414gzip --best --stdout ${target} > ${target}.gz 
  • lang/objective-cplusplus/i3/trunk/windows/pty/pty.c

    r35451 r35519  
    314314    int loop = 0; 
    315315    for (loop = 0; 1; loop++) { 
     316        errno = 0; 
    316317        char buf[BUFSIZE]; 
    317         errno = 0; 
    318318        int ret = read(0, buf, sizeof(buf)); 
    319319        if (ret == 0) { 
     
    329329 
    330330        int ret2 = 0; 
    331         char log[sizeof(buf)] = {0}; 
     331        char log[sizeof(buf) + 1] = {0}; 
    332332        memcpy(log, buf, ret); 
    333333        debug2("[#%d]%s", loop, log); 
     
    367367 
    368368        int ret2 = 0; 
    369         char log[sizeof(buf)] = {0}; 
     369        char log[sizeof(buf) + 1] = {0}; 
    370370        memcpy(log, buf, ret); 
    371371        debug("%s", log); 
  • lang/objective-cplusplus/i3/trunk/windows/pty/test.sh

    r35433 r35519  
    22 
    33rm -f fakecygpty && \ 
    4 gcc pty.c -o fakecygpty && \ 
     4gcc pty.c -Wall -Wextra -o fakecygpty && \ 
    55PS1="$ " expect -f test.expect 
    66