From: Chris Hanson Date: Tue, 18 Aug 1992 02:56:23 +0000 (+0000) Subject: Add command-line switch "-no-suspend-file" to disable the generation X-Git-Tag: 20090517-FFI~9117 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=20165a61c28566081507cdab783a24d0a8b7fea9;p=mit-scheme.git Add command-line switch "-no-suspend-file" to disable the generation of "~/scheme_suspend" files. --- diff --git a/v7/src/runtime/intrpt.scm b/v7/src/runtime/intrpt.scm index 108a9ca31..f7bc82a26 100644 --- a/v7/src/runtime/intrpt.scm +++ b/v7/src/runtime/intrpt.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/intrpt.scm,v 14.10 1992/02/25 22:55:20 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/intrpt.scm,v 14.11 1992/08/18 02:56:20 cph Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -85,23 +85,28 @@ MIT in each case. |# (clear-interrupts! interrupt-bit/timer) (thread-timer-interrupt-handler)) +;; This switch is set by the command-line initialization code. +(define generate-suspend-file?) + (define (suspend-interrupt-handler interrupt-code interrupt-enables) interrupt-code interrupt-enables (clear-interrupts! interrupt-bit/suspend) - (bind-condition-handler (list condition-type:serious-condition) - (lambda (condition) - condition - (%exit)) - (lambda () - (bind-condition-handler (list condition-type:warning) + (if generate-suspend-file? + (bind-condition-handler (list condition-type:serious-condition) (lambda (condition) condition - (muffle-warning)) + (%exit)) (lambda () - (if (not (disk-save (merge-pathnames "scheme_suspend" - (user-homedir-pathname)) - true)) - (%exit))))))) + (bind-condition-handler (list condition-type:warning) + (lambda (condition) + condition + (muffle-warning)) + (lambda () + (if (not (disk-save (merge-pathnames "scheme_suspend" + (user-homedir-pathname)) + true)) + (%exit)))))) + (%exit))) (define (gc-out-of-space-handler . args) args diff --git a/v7/src/runtime/load.scm b/v7/src/runtime/load.scm index 2b5ad42b7..142b138aa 100644 --- a/v7/src/runtime/load.scm +++ b/v7/src/runtime/load.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.39 1992/08/13 11:48:04 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.40 1992/08/18 02:56:22 cph Exp $ -Copyright (c) 1988-1992 Massachusetts Institute of Technology +Copyright (c) 1988-92 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -283,6 +283,7 @@ MIT in each case. |# unspecific)) (define (process-command-line) + (set! generate-suspend-file? true) (hook/process-command-line ((ucode-primitive get-unused-command-line 0)))) (define hook/process-command-line) @@ -404,6 +405,13 @@ MIT in each case. |# (set! *load-init-file?* false) (values (cdr command-line) #f))) + (set! generate-suspend-file? true) + (set-command-line-parser! + "-no-suspend-file" + (lambda (command-line) + (set! generate-suspend-file? false) + (values (cdr command-line) #f))) + (set-command-line-parser! "-load" (lambda (command-line) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 540078353..6d32c69e1 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.158 1992/08/12 01:08:57 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.159 1992/08/18 02:56:23 cph Exp $ -Copyright (c) 1988-1992 Massachusetts Institute of Technology +Copyright (c) 1988-92 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1028,6 +1028,8 @@ MIT in each case. |# (export (runtime emacs-interface) hook/^G-interrupt hook/clean-input/flush-typeahead) + (export (runtime load) + generate-suspend-file?) (initialization (initialize-package!))) (define-package (runtime lambda-abstraction) diff --git a/v8/src/runtime/load.scm b/v8/src/runtime/load.scm index 252a15561..ec8c731c5 100644 --- a/v8/src/runtime/load.scm +++ b/v8/src/runtime/load.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.39 1992/08/13 11:48:04 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.40 1992/08/18 02:56:22 cph Exp $ -Copyright (c) 1988-1992 Massachusetts Institute of Technology +Copyright (c) 1988-92 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -283,6 +283,7 @@ MIT in each case. |# unspecific)) (define (process-command-line) + (set! generate-suspend-file? true) (hook/process-command-line ((ucode-primitive get-unused-command-line 0)))) (define hook/process-command-line) @@ -404,6 +405,13 @@ MIT in each case. |# (set! *load-init-file?* false) (values (cdr command-line) #f))) + (set! generate-suspend-file? true) + (set-command-line-parser! + "-no-suspend-file" + (lambda (command-line) + (set! generate-suspend-file? false) + (values (cdr command-line) #f))) + (set-command-line-parser! "-load" (lambda (command-line) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index 6e0b3f30a..a53c65b58 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.158 1992/08/12 01:08:57 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.159 1992/08/18 02:56:23 cph Exp $ -Copyright (c) 1988-1992 Massachusetts Institute of Technology +Copyright (c) 1988-92 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1028,6 +1028,8 @@ MIT in each case. |# (export (runtime emacs-interface) hook/^G-interrupt hook/clean-input/flush-typeahead) + (export (runtime load) + generate-suspend-file?) (initialization (initialize-package!))) (define-package (runtime lambda-abstraction)