vm: store full command-line including executable first argument.
parent
b68174511c
commit
025283f252
|
@ -71,7 +71,7 @@ SYMBOL: bootstrap-time
|
||||||
|
|
||||||
strip-encodings
|
strip-encodings
|
||||||
|
|
||||||
(command-line) parse-command-line
|
(command-line) rest parse-command-line
|
||||||
|
|
||||||
! Set dll paths
|
! Set dll paths
|
||||||
os windows? [ "windows" require ] when
|
os windows? [ "windows" require ] when
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2011 Joe Groff.
|
! Copyright (C) 2011 Joe Groff.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: command-line eval io io.pathnames kernel namespaces
|
USING: command-line eval io io.pathnames kernel namespaces
|
||||||
system vocabs.loader ;
|
sequences system vocabs.loader ;
|
||||||
IN: command-line.startup
|
IN: command-line.startup
|
||||||
|
|
||||||
: cli-usage ( -- )
|
: cli-usage ( -- )
|
||||||
|
@ -28,7 +28,7 @@ from within Factor for more information.
|
||||||
os windows? [ script get "/?" = ] [ f ] if or ;
|
os windows? [ script get "/?" = ] [ f ] if or ;
|
||||||
|
|
||||||
: command-line-startup ( -- )
|
: command-line-startup ( -- )
|
||||||
(command-line) parse-command-line
|
(command-line) rest parse-command-line
|
||||||
help? [ cli-usage ] [
|
help? [ cli-usage ] [
|
||||||
load-vocab-roots
|
load-vocab-roots
|
||||||
run-user-init
|
run-user-init
|
||||||
|
|
|
@ -177,7 +177,7 @@ void factor_vm::init_factor(vm_parameters* p) {
|
||||||
void factor_vm::pass_args_to_factor(int argc, vm_char** argv) {
|
void factor_vm::pass_args_to_factor(int argc, vm_char** argv) {
|
||||||
growable_array args(this);
|
growable_array args(this);
|
||||||
|
|
||||||
for (fixnum i = 1; i < argc; i++)
|
for (fixnum i = 0; i < argc; i++)
|
||||||
args.add(allot_alien(false_object, (cell)argv[i]));
|
args.add(allot_alien(false_object, (cell)argv[i]));
|
||||||
|
|
||||||
args.trim();
|
args.trim();
|
||||||
|
|
Loading…
Reference in New Issue