Added reinitializer package

This commit is contained in:
Martin Gasbichler 2004-02-12 14:48:39 +00:00
parent 227ae78af7
commit e93d8b87dc
7 changed files with 37 additions and 0 deletions

2
NEWS
View File

@ -1,7 +1,9 @@
version 0.6
* New s48 library: reinitializer
* New scsh libraries: file-mode
* New s48 libraries: SRFI-34/SRFI-35 exceptions and conditions, SRFI-10
version 0.5 2003-11-19
* New s48 libraries: procedure-tables.
* New scsh libraries: tiff.

1
s48/heap-images/AUTHORS Normal file
View File

@ -0,0 +1 @@
Martin Gasbichler

1
s48/heap-images/BLURB Normal file
View File

@ -0,0 +1 @@
reinitializers: Specify code to run on scsh's startup

12
s48/heap-images/README Normal file
View File

@ -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.

View File

@ -0,0 +1,4 @@
(define-interface reinitializers-interface
(export make-reinitializer
reinitializer?))

View File

@ -0,0 +1,5 @@
(define-structure reinitializers reinitializers-interface
(open scheme
define-record-types
records)
(files reinitializer))

View File

@ -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))))