Some minor improvements.
dump-libscsh-image is now the only export of the libscsh package.
This commit is contained in:
parent
e8fe6105bf
commit
1585024cd4
|
@ -5,14 +5,9 @@
|
|||
(define (return-from-vm n)
|
||||
(with-continuation (if #t #f) (lambda () n)))
|
||||
|
||||
(define *user-context*)
|
||||
|
||||
;; must be called from a running command processor
|
||||
(define (save-user-envs!)
|
||||
(set! *user-context* (user-context)))
|
||||
|
||||
(define (startup args)
|
||||
(start-new-session *user-context*
|
||||
(define (startup user-context)
|
||||
(lambda (args)
|
||||
(start-new-session user-context
|
||||
(current-input-port)
|
||||
(current-output-port)
|
||||
(current-error-port)
|
||||
|
@ -21,7 +16,7 @@
|
|||
(with-interaction-environment
|
||||
(user-environment)
|
||||
(lambda ()
|
||||
(return-from-vm 0))))
|
||||
(return-from-vm 0)))))
|
||||
|
||||
(define (s48-command command-string)
|
||||
(let* ((in (make-string-input-port command-string))
|
||||
|
@ -45,7 +40,7 @@
|
|||
(display "null as result"
|
||||
(current-error-port)))
|
||||
((null? (cdr args))
|
||||
(display "evaluated:" (current-error-port))
|
||||
(display "evaluated to:" (current-error-port))
|
||||
(display (car args)(current-error-port))
|
||||
(newline (current-error-port))
|
||||
(car args))
|
||||
|
@ -56,8 +51,9 @@
|
|||
(display "s48-command got not exactly one s-exp"
|
||||
(current-error-port)))))
|
||||
|
||||
;; must be called from a running command processor
|
||||
(define (dump-libscsh-image filename)
|
||||
(dump-scsh-program startup filename))
|
||||
(dump-scsh-program (startup (user-context)) filename))
|
||||
|
||||
(define-exported-binding "s48-command" s48-command)
|
||||
|
||||
|
|
|
@ -481,8 +481,7 @@
|
|||
bitwise)
|
||||
(files syslog))
|
||||
|
||||
(define-structure libscsh (export startup
|
||||
save-user-envs!)
|
||||
(define-structure libscsh (export dump-libscsh-image)
|
||||
(open scheme
|
||||
external-calls
|
||||
(subset i/o (current-error-port))
|
||||
|
|
Loading…
Reference in New Issue