From 025283f25281c1c961a8d06b771e5e69f5ea18dd Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 22 Dec 2014 22:39:52 -0800 Subject: [PATCH] vm: store full command-line including executable first argument. --- basis/bootstrap/stage2.factor | 2 +- basis/command-line/startup/startup.factor | 4 ++-- vm/factor.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor index 15872ce499..f74e577220 100644 --- a/basis/bootstrap/stage2.factor +++ b/basis/bootstrap/stage2.factor @@ -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 diff --git a/basis/command-line/startup/startup.factor b/basis/command-line/startup/startup.factor index a3e2750f1b..a93bf2763f 100644 --- a/basis/command-line/startup/startup.factor +++ b/basis/command-line/startup/startup.factor @@ -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 diff --git a/vm/factor.cpp b/vm/factor.cpp index 52985a0a52..6bc8d6de9d 100644 --- a/vm/factor.cpp +++ b/vm/factor.cpp @@ -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();