Added reinitializer package
This commit is contained in:
parent
227ae78af7
commit
e93d8b87dc
2
NEWS
2
NEWS
|
@ -1,7 +1,9 @@
|
||||||
version 0.6
|
version 0.6
|
||||||
|
* New s48 library: reinitializer
|
||||||
* New scsh libraries: file-mode
|
* New scsh libraries: file-mode
|
||||||
* New s48 libraries: SRFI-34/SRFI-35 exceptions and conditions, SRFI-10
|
* New s48 libraries: SRFI-34/SRFI-35 exceptions and conditions, SRFI-10
|
||||||
|
|
||||||
|
|
||||||
version 0.5 2003-11-19
|
version 0.5 2003-11-19
|
||||||
* New s48 libraries: procedure-tables.
|
* New s48 libraries: procedure-tables.
|
||||||
* New scsh libraries: tiff.
|
* New scsh libraries: tiff.
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Martin Gasbichler
|
|
@ -0,0 +1 @@
|
||||||
|
reinitializers: Specify code to run on scsh's startup
|
|
@ -0,0 +1,12 @@
|
||||||
|
The package REINITIALIZERS allows the user to specify code that is
|
||||||
|
executed on every start of scsh, provided a heap image containing the
|
||||||
|
reinitializer is used.
|
||||||
|
|
||||||
|
Procedures:
|
||||||
|
|
||||||
|
(make-reinitializer thunk) -> reinitializer
|
||||||
|
|
||||||
|
Creates a reinitializer that runs THUNK on every start of the system.
|
||||||
|
The returned reinitializer should be saved in a global variable to
|
||||||
|
ensure that it is reachable for the garbage collector and saved in the
|
||||||
|
heap image.
|
|
@ -0,0 +1,4 @@
|
||||||
|
(define-interface reinitializers-interface
|
||||||
|
(export make-reinitializer
|
||||||
|
reinitializer?))
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
(define-structure reinitializers reinitializers-interface
|
||||||
|
(open scheme
|
||||||
|
define-record-types
|
||||||
|
records)
|
||||||
|
(files reinitializer))
|
|
@ -0,0 +1,12 @@
|
||||||
|
(define-record-type reinitializer :reinitializer
|
||||||
|
(make-reinitializer thunk)
|
||||||
|
reinitializer?
|
||||||
|
(thunk reinitializer-thunk))
|
||||||
|
|
||||||
|
(define-record-discloser :reinitializer
|
||||||
|
(lambda (r)
|
||||||
|
(list 'reinitializer (reinitializer-thunk r))))
|
||||||
|
|
||||||
|
(define-record-resumer :reinitializer
|
||||||
|
(lambda (r)
|
||||||
|
((reinitializer-thunk r))))
|
Loading…
Reference in New Issue