Initialize event system etc. in scripts too.

This commit is contained in:
marting 2000-08-28 12:51:22 +00:00
parent dabbe8ca90
commit 82f8195911
4 changed files with 29 additions and 24 deletions

View File

@ -65,7 +65,7 @@
push-command-levels? push-command-levels?
start-new-session start-new-session
session-started? ; for scsh
command-input command-input
command-output command-output
command-error-output command-error-output

View File

@ -276,6 +276,8 @@
fluids-internal ; JMG: get-dynamic-env fluids-internal ; JMG: get-dynamic-env
scsh-utilities scsh-utilities
interrupts interrupts
low-interrupt
events
primitives primitives
scheme) scheme)
(files startup)) (files startup))
@ -306,6 +308,7 @@
scsh-level-0 ; with-current-input-port error-output-port scsh-level-0 ; with-current-input-port error-output-port
; with-current-output-port exit ; with-current-output-port exit
scsh-level-0-internals ; set-command-line-args! init-scsh-vars scsh-level-0-internals ; set-command-line-args! init-scsh-vars
threads
scheme) scheme)
(files top meta-arg)) (files top meta-arg))

View File

@ -1,14 +1,13 @@
#!/usr/local/lib/scsh/scshvm \ #!/home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/scshvm \
-o /usr/local/lib/scsh/scshvm -h 8000000 -i /usr/local/lib/scsh/scsh.image -lm /usr/local/lib/scsh/vm/ps-interface.scm -lm /usr/local/lib/scsh/vm/interfaces.scm -lm /usr/local/lib/scsh/vm/package-defs.scm -lm /usr/local/lib/scsh/vm/s48-package-defs.scm -dm -m static-heaps -e static-heap-linker -s -o /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/scshvm -h 8000000 -i /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/scsh.image -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/ps-interface.scm -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/interfaces.scm -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/package-defs.scm -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/s48-package-defs.scm -dm -m static-heaps -e static-heap-linker -s
!# !#
#! #!
For testing load this at a scsh prompt For testing load this at a scsh prompt
,config ,load ../scheme/prescheme/interface.scm ,config ,load ../vm/ps-interface.scm
,config ,load ../scheme/prescheme/package-defs.scm ,config ,load ../vm/interfaces.scm
,config ,load ../scheme/vm/interfaces.scm ,config ,load ../vm/package-defs.scm
,config ,load ../scheme/vm/s48-package-defs.scm ,config ,load ../vm/s48-package-defs.scm
,config ,load ../scheme/vm/package-defs.scm
,config ,load static.scm ,config ,load static.scm
,load-package static-heaps ,load-package static-heaps
,in static-heaps ,in static-heaps
@ -134,17 +133,17 @@ For testing load this at a scsh prompt
options options
(or (options:cc-command options) (or (options:cc-command options)
(getenv "CC") (getenv "CC")
"gcc -g -O2")) "gcc -O2"))
(set-options:ld-flags (set-options:ld-flags
options options
(or (options:ld-flags options) (or (options:ld-flags options)
(getenv "LDFLAGS") (getenv "LDFLAGS")
"")) "-rdynamic"))
(set-options:libraries (set-options:libraries
options options
(or (options:libraries options) (or (options:libraries options)
(getenv "LIBS") (getenv "LIBS")
"-ldl -lnsl -lm ")) "-lcrypt -lm "))
options)) options))
;;; usage reporting ;;; usage reporting
@ -453,7 +452,7 @@ For testing load this at a scsh prompt
(cons "static.o" (cons "static.o"
l))))) l)))))
(options:args-parser options) (options:args-parser options)
'("-L" "/usr/local/lib/scsh" "-lscshvm") '("-L" "/home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh" "-lscshvm")
libs))) libs)))
(message command) (message command)
(run (,@command))))) (run (,@command)))))

View File

@ -219,6 +219,8 @@
(get-reflective-tower (user-environment)) ; ??? (get-reflective-tower (user-environment)) ; ???
name)) name))
(define (forever-sleeping-thread) (sleep 10000) (forever-sleeping-thread))
(define (parse-switches-and-execute all-args context) (define (parse-switches-and-execute all-args context)
(receive (switches term-switch term-val top-entry args) (receive (switches term-switch term-val top-entry args)
(parse-scsh-args (cdr all-args)) (parse-scsh-args (cdr all-args))
@ -235,6 +237,7 @@
(environment-for-commands) (environment-for-commands)
(lambda () (lambda ()
(begin (begin
(spawn forever-sleeping-thread)
(init-low-interrupt) (init-low-interrupt)
(install-event-handlers!) (install-event-handlers!)
(%install-scsh-handlers) (%install-scsh-handlers)