mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
fix include-ci (issue #687)
This commit is contained in:
parent
b89db31e37
commit
e307c872bf
1 changed files with 11 additions and 10 deletions
|
@ -1273,7 +1273,7 @@
|
|||
|
||||
(define (load file . o)
|
||||
(let* ((env (if (pair? o) (car o) (interaction-environment)))
|
||||
(len (string-length file))
|
||||
(len (if (port? file) 0 (string-length file)))
|
||||
(ext *shared-object-extension*)
|
||||
(ext-len (string-length ext)))
|
||||
(cond
|
||||
|
@ -1284,15 +1284,16 @@
|
|||
(dynamic-wind
|
||||
(lambda () (set-current-environment! env))
|
||||
(lambda ()
|
||||
(call-with-input-file file
|
||||
(lambda (in)
|
||||
(let ((in (if (port? file) file (open-input-file file))))
|
||||
(set-port-line! in 1)
|
||||
(let lp ()
|
||||
(let lp ((res (if #f #f)))
|
||||
(let ((x (read in)))
|
||||
(cond
|
||||
((not (eof-object? x))
|
||||
(eval x env)
|
||||
(lp))))))))
|
||||
((eof-object? x)
|
||||
(if (not (port? file))
|
||||
(close-input-port in)))
|
||||
(else
|
||||
(lp (eval x env))))))))
|
||||
(lambda () (set-current-environment! old-env))))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Add table
Reference in a new issue