[Wisp-cvs] wisp/src/builtin init.wisp,1.63,1.64
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-02-08 18:13:44
|
Update of /cvsroot/wisp/wisp/src/builtin In directory sc8-pr-cvs1:/tmp/cvs-serv9052/builtin Modified Files: init.wisp Log Message: implemented |system-path-ref| Index: init.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/init.wisp,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- init.wisp 18 Sep 2002 21:18:04 -0000 1.63 +++ init.wisp 8 Feb 2003 18:13:41 -0000 1.64 @@ -19,6 +19,14 @@ (local *arglist* ((asm NN_pr_get_argument_list))) +(define *system-path* + (make-box '("/usr/local/share/wisp" "/usr/share/wisp"))) + +(define (system-path-ref (:= new-path)) + (if (not :=?) + (map string-copy (box-ref *system-path*)) + (set! (box-ref *system-path*) (map string-copy new-path)))) + (define (run-file opkeys script args) (if (memq #\V opkeys) (state-version)) @@ -48,6 +56,8 @@ (string-append home "/.wisp")))))) (if curdir? (cons! (box-ref *system-path*) ".")) + ; set up the *first* environment + (set! (dict-ref *user-dictionary* 'system-path-ref) system-path-ref) (if asm? (begin (set! (dict-ref *user-dictionary* 'assemble) assemble) @@ -70,9 +80,6 @@ (cut load <> *user-dictionary*)))) (else (load (current-input-port) *user-dictionary*))))) (exit 0))) ; report success - -(define *system-path* - (make-box '("/usr/local/share/wisp" "/usr/share/wisp"))) ; If no arguments are given, run an interactive session. (if (null? *arglist*) |