Skip to content
Snippets Groups Projects
Commit addf17d7 authored by rtoy's avatar rtoy
Browse files

code/commandline.lisp:

o Command line parsing now recognizes "--" and disables any further
  processing by CMUCL itself.  Everything after "--" is placed in the
  new variable EXT:*COMMAND-LINE-APPLICATION-ARGUMENTS*, which is a
  list of strings.

code/exports.lisp:
o Export EXT:*COMMAND-LINE-APPLICATION-ARGUMENTS*.

general-info/release-19f.txt:
o Update.
parent 4040cc75
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/commandline.lisp,v 1.16 2008/11/12 15:04:23 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/commandline.lisp,v 1.17 2009/01/06 01:11:23 rtoy Rel $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -14,13 +14,16 @@ ...@@ -14,13 +14,16 @@
;;; ;;;
(in-package "EXTENSIONS") (in-package "EXTENSIONS")
(export '(*command-line-words* *command-line-switches* (export '(*command-line-application-arguments* *command-line-words* *command-line-switches*
*command-switch-demons* *command-line-utility-name* *command-switch-demons* *command-line-utility-name*
*command-line-strings* *batch-mode* *command-line-strings* *batch-mode*
cmd-switch-string command-line-switch-p cmd-switch-string command-line-switch-p
cmd-switch-name cmd-switch-value cmd-switch-words command-line-switch cmd-switch-name cmd-switch-value cmd-switch-words command-line-switch
defswitch cmd-switch-arg get-command-line-switch)) defswitch cmd-switch-arg get-command-line-switch))
(defvar *command-line-application-arguments* ()
"A list of all the command line arguments after --")
(defvar *command-line-switches* () (defvar *command-line-switches* ()
"A list of cmd-switch's representing the arguments used to invoke "A list of cmd-switch's representing the arguments used to invoke
this process.") this process.")
...@@ -107,10 +110,16 @@ ...@@ -107,10 +110,16 @@
(push (make-cmd-switch switch value (nreverse word-list)) (push (make-cmd-switch switch value (nreverse word-list))
*command-line-switches*) *command-line-switches*)
(return nil)) (return nil))
(unless (zerop (length (the simple-string str))) (unless (zerop (length (the simple-string str)))
(when (char= #\- (schar str 0)) (when (char= #\- (schar str 0))
(push (make-cmd-switch switch value (nreverse word-list)) (push (make-cmd-switch switch value (nreverse word-list))
*command-line-switches*) *command-line-switches*)
(when (and (= (length str) 2)
(char= #\- (schar str 1)))
;; Gather up everything after --, and exit.
(setf *command-line-application-arguments* cmd-strings)
(setf str nil))
(return nil)) (return nil))
(push str word-list)) (push str word-list))
(setq str (pop cmd-strings)))))))) (setq str (pop cmd-strings))))))))
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/exports.lisp,v 1.278 2008/12/31 17:50:01 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/exports.lisp,v 1.279 2009/01/06 01:11:24 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -1385,6 +1385,7 @@ ...@@ -1385,6 +1385,7 @@
(:export "*COMMAND-LINE-WORDS*" "*COMMAND-LINE-SWITCHES*" (:export "*COMMAND-LINE-WORDS*" "*COMMAND-LINE-SWITCHES*"
"*COMMAND-SWITCH-DEMONS*" "*COMMAND-LINE-UTILITY-NAME*" "*COMMAND-SWITCH-DEMONS*" "*COMMAND-LINE-UTILITY-NAME*"
"*COMMAND-LINE-STRINGS*" "*BATCH-MODE*" "*COMMAND-LINE-STRINGS*" "*BATCH-MODE*"
"*COMMAND-LINE-APPLICATION-ARGUMENTS*
"CMD-SWITCH-STRING" "COMMAND-LINE-SWITCH-P" "CMD-SWITCH-STRING" "COMMAND-LINE-SWITCH-P"
"CMD-SWITCH-NAME" "CMD-SWITCH-VALUE" "CMD-SWITCH-WORDS" "COMMAND-LINE-SWITCH" "CMD-SWITCH-NAME" "CMD-SWITCH-VALUE" "CMD-SWITCH-WORDS" "COMMAND-LINE-SWITCH"
"DEFSWITCH" "CMD-SWITCH-ARG" "GET-COMMAND-LINE-SWITCH") "DEFSWITCH" "CMD-SWITCH-ARG" "GET-COMMAND-LINE-SWITCH")
......
...@@ -44,6 +44,10 @@ New in this release: ...@@ -44,6 +44,10 @@ New in this release:
o If the chip supports sse2, but CMUCL can't find the sse2 core, o If the chip supports sse2, but CMUCL can't find the sse2 core,
CMUCL will try to fall back to the x87 core. (This only CMUCL will try to fall back to the x87 core. (This only
happens if -fpu is auto.) happens if -fpu is auto.)
- Command line parsing now recognizes the option "--". Everything
after "--" is not subject to CMUCL's command line parsing, and
everything after the "--" is placed in the new variable
EXT:*COMMAND-LINE-APPLICATION-ARGUMENTS*.
* ANSI compliance fixes: * ANSI compliance fixes:
- Fix bug in backquote printer. If the variable is @foo, we want - Fix bug in backquote printer. If the variable is @foo, we want
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment