]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: store full command-line including executable first argument.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 23 Dec 2014 06:39:52 +0000 (22:39 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 23 Dec 2014 06:39:52 +0000 (22:39 -0800)
basis/bootstrap/stage2.factor
basis/command-line/startup/startup.factor
vm/factor.cpp

index 15872ce4997f30bf8b1651e953d7e197c1537a12..f74e577220e62edaf850f563530a837e570fd766 100644 (file)
@@ -71,7 +71,7 @@ SYMBOL: bootstrap-time
 
     strip-encodings
 
-    (command-line) parse-command-line
+    (command-line) rest parse-command-line
 
     ! Set dll paths
     os windows? [ "windows" require ] when
index a3e2750f1bce6aac2d091b85b082c2f7db0e366a..a93bf2763fb5e974dc65cd0cb07b06a16b74f675 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2011 Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: command-line eval io io.pathnames kernel namespaces
-system vocabs.loader ;
+sequences system vocabs.loader ;
 IN: command-line.startup
 
 : cli-usage ( -- )
@@ -28,7 +28,7 @@ from within Factor for more information.
     os windows? [ script get "/?" = ] [ f ] if or ;
 
 : command-line-startup ( -- )
-    (command-line) parse-command-line
+    (command-line) rest parse-command-line
     help? [ cli-usage ] [
         load-vocab-roots
         run-user-init
index 52985a0a52a93e61ee01d16f6936d85dcab3e663..6bc8d6de9d00a821903617942da7b28b8d461b6c 100644 (file)
@@ -177,7 +177,7 @@ void factor_vm::init_factor(vm_parameters* p) {
 void factor_vm::pass_args_to_factor(int argc, vm_char** argv) {
   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.trim();