diff --git a/NEWS b/NEWS index f3eb270..6daafc6 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/s48/heap-images/AUTHORS b/s48/heap-images/AUTHORS new file mode 100644 index 0000000..87c8969 --- /dev/null +++ b/s48/heap-images/AUTHORS @@ -0,0 +1 @@ +Martin Gasbichler \ No newline at end of file diff --git a/s48/heap-images/BLURB b/s48/heap-images/BLURB new file mode 100644 index 0000000..56d999e --- /dev/null +++ b/s48/heap-images/BLURB @@ -0,0 +1 @@ +reinitializers: Specify code to run on scsh's startup \ No newline at end of file diff --git a/s48/heap-images/README b/s48/heap-images/README new file mode 100644 index 0000000..45888bf --- /dev/null +++ b/s48/heap-images/README @@ -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. \ No newline at end of file diff --git a/s48/heap-images/interfaces.scm b/s48/heap-images/interfaces.scm new file mode 100644 index 0000000..6c71872 --- /dev/null +++ b/s48/heap-images/interfaces.scm @@ -0,0 +1,4 @@ +(define-interface reinitializers-interface + (export make-reinitializer + reinitializer?)) + \ No newline at end of file diff --git a/s48/heap-images/packages.scm b/s48/heap-images/packages.scm new file mode 100644 index 0000000..925d1e7 --- /dev/null +++ b/s48/heap-images/packages.scm @@ -0,0 +1,5 @@ +(define-structure reinitializers reinitializers-interface + (open scheme + define-record-types + records) + (files reinitializer)) diff --git a/s48/heap-images/reinitializer.scm b/s48/heap-images/reinitializer.scm new file mode 100644 index 0000000..ab7c565 --- /dev/null +++ b/s48/heap-images/reinitializer.scm @@ -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))))