Changeset 36210
- Timestamp:
- 12/20/09 14:57:04 (3 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 17 modified
-
autotools/am/i3.am (modified) (1 diff)
-
autotools/am/mil_test.am (modified) (1 diff)
-
configure.ac (modified) (6 diffs)
-
po/POTFILES.in (modified) (1 diff)
-
src/Common.cpp (modified) (4 diffs)
-
src/Common.h (modified) (2 diffs)
-
src/Main.cpp (modified) (1 diff)
-
src/Mediator.cpp (modified) (1 diff)
-
src/Mediator.h (modified) (1 diff)
-
src/gui-cocoa/Gui.cpp (modified) (1 diff)
-
src/gui-windows/Gui.cpp (modified) (1 diff)
-
src/mil/include/mil/StaticDataObjC.cpp (modified) (3 diffs)
-
src/os-unix/Os.cpp (modified) (1 diff)
-
src/os-windows/Os.cpp (modified) (5 diffs)
-
src/os-windows/resources/i3.rc (modified) (1 diff)
-
windows/i3.vcproj (modified) (4 diffs)
-
windows/i3_test.vcproj (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/autotools/am/i3.am
r36161 r36210 6 6 i3_SOURCES_NO_MAIN = \ 7 7 src/Common.cpp \ 8 src/Mediator.cpp \ 9 src/Delegate.cpp \ 8 10 src/CompletionWindow.cpp \ 9 src/Delegate.cpp \10 11 src/InputWindow.cpp \ 11 src/Mediator.cpp \12 12 src/OutputWindow.cpp \ 13 13 src/ShellManager.cpp \ -
lang/objective-cplusplus/i3/trunk/autotools/am/mil_test.am
r36174 r36210 8 8 src/mil/src/test/Main.cpp \ 9 9 src/mil/src/test/Atomic.cpp \ 10 src/mil/src/test/DoubleBuffer.cpp \ 10 11 src/mil/src/test/MscCrt.cpp \ 11 12 src/mil/src/test/Synchronize.cpp \ -
lang/objective-cplusplus/i3/trunk/configure.ac
r36191 r36210 52 52 AS_HELP_STRING([--enable-debug], [build debug binaries]), 53 53 enable_debug="$enableval", 54 enable_debug="no"55 #enable_debug="yes"54 #enable_debug="no" 55 enable_debug="yes" 56 56 ) 57 57 … … 80 80 cygwin) 81 81 with_os=unix 82 with_gui_default=windows83 #with_gui_default=gnustep82 #with_gui_default=windows 83 with_gui_default=gnustep 84 84 LDFLAGS="$LDFLAGS -Wl,--enable-auto-import" 85 85 ;; … … 169 169 LDFLAGS_ORIG="$LDFLAGS" 170 170 LDFLAGS="$LDFLAGS -xobjective-c++" 171 AC_ LINK_IFELSE(171 AC_RUN_IFELSE( 172 172 [AC_LANG_PROGRAM( 173 173 [[ … … 188 188 ]])], 189 189 [], 190 [AC_MSG_FAILURE([Objective C++ compiler/linker does not work])]) 191 192 AC_RUN_IFELSE( 193 [AC_LANG_PROGRAM([[]], [[]])], 194 [], 195 [AC_MSG_FAILURE([Objective C++ compiler/linker does not work])], 190 [AC_MSG_FAILURE([Objective program does not work])], 196 191 []) 197 192 … … 199 194 LDFLAGS="$LDFLAGS_ORIG" 200 195 fi 201 202 AC_CHECK_HEADERS([__NON__EXISTANT__HEADER__FILE__],203 [AC_MSG_FAILURE([no error when include file is not found])])204 196 205 197 AC_SUBST(GCH_LANG) … … 385 377 AC_DEFINE(I3_CONFIG_H_INCLUDE_GUARD, 1, [Include guard]) 386 378 387 # --------------------------------------- 388 # last check 389 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[],[AC_MSG_FAILURE([can't compile empty source])]) 390 AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]],[[]])],[],[AC_MSG_FAILURE([can't link empty source])]) 391 AC_RUN_IFELSE( [AC_LANG_PROGRAM([[]],[[]])],[],[AC_MSG_FAILURE([can't run empty source])], []) 379 AC_CHECK_HEADERS([__NON__EXISTANT__HEADER__FILE__], 380 [AC_MSG_FAILURE([no error when include file is not found])]) 392 381 393 382 # --------------------------------------- -
lang/objective-cplusplus/i3/trunk/po/POTFILES.in
r36188 r36210 60 60 src/mil/include/xbyak/xbyak_bin2hex.h 61 61 src/mil/include/xbyak/xbyak_mnemonic.h 62 src/mil/src/profile/Profile.h 62 63 src/mil/src/test/Test.h 63 64 src/os-unix/Os.h -
lang/objective-cplusplus/i3/trunk/src/Common.cpp
r36190 r36210 20 20 } 21 21 22 exit_statusexecute_popt(int argc, char** argv) {22 int execute_popt(int argc, char** argv) { 23 23 int c; /* used for argument parsing */ 24 24 int i = 0; /* used for tracking options */ … … 118 118 poptFreeContext(optCon); 119 119 return 0; 120 120 121 normal_exit: 121 122 poptFreeContext(optCon); 122 return exit_status::exit_when_special_argument(); 123 exit(EXIT_SUCCESS); 124 123 125 error_exit: 124 126 poptFreeContext(optCon); … … 199 201 #else 200 202 namespace i3 { 201 exit_statusexecute_popt(int argc, char** argv) {203 int execute_popt(int argc, char** argv) { 202 204 return 0; 203 205 } … … 206 208 207 209 namespace i3 { 208 exit_status init_common_global_data(int argc, char** argv) { 210 int init_common_global_data(int argc, char** argv) { 211 int result = execute_popt(argc, argv); 209 212 srand(clock()); 210 return execute_popt(argc, argv);213 return result; 211 214 } 212 215 -
lang/objective-cplusplus/i3/trunk/src/Common.h
r36182 r36210 63 63 #include <mil/DoubleBuffer.h> 64 64 65 namespace i3 {66 struct exit_status {67 exit_status() : code(0), exit(false) {}68 exit_status(int code) : code(code), exit(code ? true : false) {}69 operator bool() {70 return exit;71 }72 static exit_status exit_when_special_argument() {73 exit_status result;74 result.code = 0;75 result.exit = true;76 return result;77 }78 int code;79 private:80 bool exit;81 };82 }83 84 65 #ifdef MIL_OS_WINDOWS 85 66 # include "os-windows/Os.h" … … 98 79 namespace i3 { 99 80 int global_loop(); 100 exit_statusinit_common_global_data(int argc, char** argv);101 exit_statusinit_os_global_data(int argc, char** argv);102 exit_statusinit_gui_global_data(int argc, char** argv);81 int init_common_global_data(int argc, char** argv); 82 int init_os_global_data(int argc, char** argv); 83 int init_gui_global_data(int argc, char** argv); 103 84 //void alert(const TCHAR* message); 104 85 void alert(string message); -
lang/objective-cplusplus/i3/trunk/src/Main.cpp
r36182 r36210 15 15 using namespace i3; 16 16 17 exit_status exit_status;17 int exit_status = EXIT_FAILURE; 18 18 19 19 if ((exit_status = init_common_global_data(argc, argv)) || 20 20 (exit_status = init_os_global_data(argc, argv)) || 21 21 (exit_status = init_gui_global_data(argc, argv))) { 22 return exit_status .code;22 return exit_status; 23 23 } 24 24 25 25 { 26 26 i3::Mediator mediator; 27 exit_status = mediator.start(); 28 if (exit_status) { 29 return exit_status.code; 30 } 27 return mediator.start(); 31 28 } 32 33 return EXIT_SUCCESS;34 29 } 35 30 -
lang/objective-cplusplus/i3/trunk/src/Mediator.cpp
r36145 r36210 12 12 } 13 13 14 exit_statusMediator::start() {14 int Mediator::start() { 15 15 16 16 #ifdef I3_TEST -
lang/objective-cplusplus/i3/trunk/src/Mediator.h
r36013 r36210 27 27 Mediator(); 28 28 ~Mediator(); 29 exit_statusstart();29 int start(); 30 30 }; 31 31 -
lang/objective-cplusplus/i3/trunk/src/gui-cocoa/Gui.cpp
r36182 r36210 8 8 } 9 9 10 exit_statusinit_gui_global_data(int argc, char** argv) {10 int init_gui_global_data(int argc, char** argv) { 11 11 [NSApplication sharedApplication]; 12 12 -
lang/objective-cplusplus/i3/trunk/src/gui-windows/Gui.cpp
r36033 r36210 24 24 } 25 25 26 exit_statusinit_gui_global_data(int argc, char** argv) {26 int init_gui_global_data(int argc, char** argv) { 27 27 #if defined(ENABLE_NLS) && (defined(UNICODE) || defined(_UNICODE)) 28 28 bind_textdomain_codeset(PACKAGE_NAME, "UTF-16LE"); -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/StaticDataObjC.cpp
r36206 r36210 16 16 int result = -1; 17 17 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 18 18 result = filter_exception_and_start(argc, argv, start); 19 return result; 20 /* 19 21 //[NSApplication sharedApplication]; 20 22 //result = filter_exception_and_start(argc, argv, start); … … 23 25 { 24 26 NSLog(@"objective-c exception setup: %x", (unsigned int)&result); 25 [NSApplication sharedApplication];27 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 26 28 result = filter_exception_and_start(argc, argv, start); 27 //NS_VALRETURN(result);28 NS_VALUERETURN(result, int);29 NS_VALRETURN(result); 30 // NS_VALUERETURN(result, int); 29 31 } 30 32 NS_HANDLER … … 40 42 41 43 return result; 44 */ 42 45 } 43 46 -
lang/objective-cplusplus/i3/trunk/src/os-unix/Os.cpp
r36182 r36210 12 12 static TCHAR program_dir[MAX_PATH] = {}; 13 13 14 exit_statusinit_os_global_data(int argc, char** argv) {14 int init_os_global_data(int argc, char** argv) { 15 15 mutable_os.program_dir = program_dir; 16 16 mutable_os.config_dir = config_dir; -
lang/objective-cplusplus/i3/trunk/src/os-windows/Os.cpp
r35906 r36210 214 214 } 215 215 216 exit_statusinit_os_global_data(int argc, char** argv) {216 int init_os_global_data(int argc, char** argv) { 217 217 //_fmode = _O_BINARY; 218 218 //_set_fmode(_O_BINARY); … … 457 457 }; 458 458 459 exit_statuscheck_args2(int argc, char** argv) {459 int check_args2(int argc, char** argv) { 460 460 #if defined(UNICODE) || defined(_UNICODE) 461 461 #ifdef ENABLE_NLS … … 463 463 struct fp_func fp_func = {s}; 464 464 bind_textdomain_codeset(PACKAGE_NAME,"UTF-8"); 465 exit_statuse = i3::execute_popt((size_t)argc, (const char**)argv, fp_func);465 int e = i3::execute_popt((size_t)argc, (const char**)argv, fp_func); 466 466 bind_textdomain_codeset(PACKAGE_NAME,"UTF-16LE"); 467 467 #else 468 exit_statuse = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout));468 int e = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout)); 469 469 #endif 470 470 #else … … 472 472 const char* codeset = bind_textdomain_codeset(PACKAGE_NAME,NULL); 473 473 bind_textdomain_codeset(PACKAGE_NAME,"UTF-8"); 474 exit_statuse = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout));474 int e = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout)); 475 475 bind_textdomain_codeset(PACKAGE_NAME,codeset); 476 476 #else 477 exit_statuse = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout));477 int e = i3::execute_popt((size_t)argc, (const char**)argv, boost::lambda::constant(stdout)); 478 478 #endif 479 479 #endif … … 485 485 486 486 #if defined(UNICODE) || defined(_UNICODE) 487 exit_statuscheck_args() {487 int check_args() { 488 488 using namespace i3::windows_execute_popt; 489 489 -
lang/objective-cplusplus/i3/trunk/src/os-windows/resources/i3.rc
r36143 r36210 6 6 #include <commctrl.h> 7 7 //#include <richedit.h> 8 #include <Version.h> 8 9 #ifdef __GNUC__ 10 #include "src/Version.h" 11 #else 12 #include "../../Version.h" 13 #endif 9 14 10 15 // Build I3_VERSION_STRING -
lang/objective-cplusplus/i3/trunk/windows/i3.vcproj
r36091 r36210 661 661 </File> 662 662 <File 663 RelativePath="..\src\mil\include\mil\os-windows\Debug.h" 664 > 665 </File> 666 <File 663 667 RelativePath="..\src\mil\include\mil\Debug.h" 664 668 > 665 669 </File> 666 670 <File 667 RelativePath="..\src\mil\include\mil\os-windows\Debug.h"668 >669 </File>670 <File671 671 RelativePath="..\src\mil\include\mil\DoubleBuffer.h" 672 672 > … … 689 689 </File> 690 690 <File 691 RelativePath="..\src\mil\include\mil\GuiModule.h" 692 > 693 </File> 694 <File 691 695 RelativePath="..\src\mil\include\mil\gui-windows\GuiModule.h" 692 696 > 693 697 </File> 694 698 <File 695 RelativePath="..\src\mil\include\mil\GuiModule.h"696 >697 </File>698 <File699 699 RelativePath="..\src\mil\include\mil\gui-windows\MessageCracker-inl.h" 700 700 > … … 737 737 </File> 738 738 <File 739 RelativePath="..\src\mil\include\mil\Thread.h" 740 > 741 </File> 742 <File 739 743 RelativePath="..\src\mil\include\mil\os-windows\Thread.h" 740 >741 </File>742 <File743 RelativePath="..\src\mil\include\mil\Thread.h"744 744 > 745 745 </File> … … 754 754 > 755 755 <File 756 RelativePath=". \resources\i3.rc"757 > 758 </File> 759 <File 760 RelativePath=". \resources\Icon1.ico"756 RelativePath="..\src\os-windows\resources\i3.rc" 757 > 758 </File> 759 <File 760 RelativePath="..\src\os-windows\resources\Icon1.ico" 761 761 > 762 762 </File> -
lang/objective-cplusplus/i3/trunk/windows/i3_test.vcproj
r36088 r36210 762 762 > 763 763 <File 764 RelativePath=". \resources\i3.rc"765 > 766 </File> 767 <File 768 RelativePath=". \resources\Icon1.ico"764 RelativePath="..\src\os-windows\resources\i3.rc" 765 > 766 </File> 767 <File 768 RelativePath="..\src\os-windows\resources\Icon1.ico" 769 769 > 770 770 </File>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)