Changeset 21104
- Timestamp:
- 10/11/08 08:36:18 (3 months ago)
- Location:
- lang/cplusplus/llv8call/trunk
- Files:
-
- 3 added
- 3 modified
-
Sconstruct (modified) (2 diffs)
-
src/SConscript (modified) (1 diff)
-
src/cmdline.c (added)
-
src/cmdline.h (added)
-
src/llv8call.ggo (added)
-
src/main.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/Sconstruct
r20951 r21104 1 PACKAGE='llv8call' 1 2 VERSION='0.12' 2 3 … … 63 64 '-DPATHSEP=%s' % fixquote(re.sub("\\\\", "\\\\\\\\", os.pathsep)), 64 65 '-DVERSION=%s' % fixquote(VERSION), 66 '-DCMDLINE_PARSER_VERSION=%s' % fixquote(VERSION), 67 '-DCMDLINE_PARSER_PACKAGE=%s' % fixquote(PACKAGE), 65 68 '-DSHLIBPREFIX=%s' % fixquote(env.subst(env['SHLIBPREFIX'])), 66 69 '-DSHLIBSUFFIX=%s' % fixquote(env.subst(env['SHLIBSUFFIX'])), -
lang/cplusplus/llv8call/trunk/src/SConscript
r20608 r21104 16 16 prog = env.Program( 17 17 "llv8call", 18 Split("main.cc util.cc builtins.cc ../v8ext/v8ext.cc sys.cc "),18 Split("main.cc util.cc builtins.cc ../v8ext/v8ext.cc sys.cc cmdline.c"), 19 19 LIBS=libs, 20 20 ) -
lang/cplusplus/llv8call/trunk/src/main.cc
r20862 r21104 12 12 #endif 13 13 #include "util.h" 14 #include "cmdline.h" 14 15 #include "v8ext.h" 15 16 … … 117 118 118 119 int main(int argc, char ** argv) { 120 gengetopt_args_info args_info; 121 if (cmdline_parser (argc, argv, &args_info) != 0) { 122 return 1; 123 } 124 119 125 // initialize 120 126 V8::SetFlagsFromCommandLine(&argc, argv, true); … … 134 140 135 141 // setup argv 136 Handle<Array> ARGV = Array::New(arg c);137 for ( int i=1; i<argc; i++) {138 ARGV->Set(Int32::New(i-1), String::New(arg v[i]));142 Handle<Array> ARGV = Array::New(args_info.inputs_num); 143 for (unsigned int i=1; i<args_info.inputs_num; i++) { 144 ARGV->Set(Int32::New(i-1), String::New(args_info.inputs[i])); 139 145 } 140 146 context->Global()->Set(String::New("ARGV"), ARGV); 141 147 142 148 // process main 143 if (argc >= 2) { 149 if (args_info.eval_given) { 150 if (!Exec(String::New(args_info.eval_arg), Undefined(), false)) { 151 return 1; 152 } else { 153 return 0; 154 } 155 } else if (args_info.inputs_num >= 1) { 144 156 const char *srcfile = argv[1]; 145 157 Handle<String> file_name = String::New(srcfile);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)