From: Chris Hanson Date: Tue, 11 May 1999 20:35:15 +0000 (+0000) Subject: Implement new procedures SIMPLE-COMMAND-LINE-PARSER and X-Git-Tag: 20090517-FFI~4539 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4837b515200c2d16c3ecd6b68ebc88b6c1490351;p=mit-scheme.git Implement new procedures SIMPLE-COMMAND-LINE-PARSER and ARGUMENT-COMMAND-LINE-PARSER and export them to global. --- diff --git a/v7/src/runtime/load.scm b/v7/src/runtime/load.scm index 38accb491..3c9ebe2b7 100644 --- a/v7/src/runtime/load.scm +++ b/v7/src/runtime/load.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: load.scm,v 14.52 1999/05/11 20:30:16 cph Exp $ +$Id: load.scm,v 14.53 1999/05/11 20:35:15 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -362,10 +362,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define *load-init-file?*) (define (default/process-command-line unused-command-line) - (let ((after-parsing-actions - (list (lambda () - (if *load-init-file?* - (load-init-file)))))) + (let ((after-parsing-actions '())) (define (process-keyword command-line unused-options) (if (not (null? command-line)) @@ -415,7 +412,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (set! *unused-command-line* (process-keyword (vector->list unused-command-line) '())) (for-each (lambda (act) (act)) - (reverse after-parsing-actions))))))) + (reverse after-parsing-actions)) + (if *load-init-file?* (load-init-file))))))) (define (load-init-file) (let ((pathname (init-file-pathname))) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 4c0aaf344..90964c62a 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.326 1999/05/08 02:23:36 cph Exp $ +$Id: runtime.pkg,v 14.327 1999/05/11 20:30:37 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -1388,6 +1388,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (files "load") (parent ()) (export () + argument-command-line-parser condition-type:not-loading current-load-pathname fasload @@ -1404,7 +1405,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. load/push-hook! load/suppress-loading-message? read-file - set-command-line-parser!) + set-command-line-parser! + simple-command-line-parser) (initialization (initialize-package!))) (define-package (runtime macros) diff --git a/v8/src/runtime/load.scm b/v8/src/runtime/load.scm index f36c53a0e..29cefa453 100644 --- a/v8/src/runtime/load.scm +++ b/v8/src/runtime/load.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: load.scm,v 14.55 1999/05/11 20:30:21 cph Exp $ +$Id: load.scm,v 14.56 1999/05/11 20:35:10 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -369,10 +369,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define *load-init-file?*) (define (default/process-command-line unused-command-line) - (let ((after-parsing-actions - (list (lambda () - (if *load-init-file?* - (load-init-file)))))) + (let ((after-parsing-actions '())) (define (process-keyword command-line unused-options) (if (not (null? command-line)) @@ -422,7 +419,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (set! *unused-command-line* (process-keyword (vector->list unused-command-line) '())) (for-each (lambda (act) (act)) - (reverse after-parsing-actions))))))) + (reverse after-parsing-actions)) + (if *load-init-file?* (load-init-file))))))) (define (load-init-file) (let ((pathname (init-file-pathname))) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index bde402dcd..5b714b9d2 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.331 1999/05/08 02:23:31 cph Exp $ +$Id: runtime.pkg,v 14.332 1999/05/11 20:30:29 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -1392,6 +1392,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (files "load") (parent ()) (export () + argument-command-line-parser condition-type:not-loading current-load-pathname fasload @@ -1408,7 +1409,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. load/push-hook! load/suppress-loading-message? read-file - set-command-line-parser!) + set-command-line-parser! + simple-command-line-parser) (initialization (initialize-package!))) (define-package (runtime macros)