Google
 

Trailing-Edge - PDP-10 Archives - clisp - clisp/upsala/reboot.clisp
There are no other files named reboot.clisp in the archive.
(in-package "LISP")
(export '(reboot))

(defvar *lisp-boot-message* "")
(defvar *lisp-boot-form*)

(defun reboot (file &optional message)
  "Reboots a lisp with filename and an optional greeting, which is prepended
  to \" Common Lisp, <lisp-implementation-version>, (c) 1985, C. Hedrick\".
  Updates *lisp-implementation-version* to \"now\", and exits."
  (setq lisp::*lisp-implementation-version*
      (multiple-value-bind (ign1 ign2 ign3 date month year) (get-decoded-time)
	(declare (ignore ign1 ign2 ign3))
	(setq month (case month
			(1 "Jan")
			(2 "Feb")
			(3 "Mar")
			(4 "Apr")
			(5 "May")
			(6 "Jun")
			(7 "Jul")
			(8 "Aug")
			(9 "Sep")
			(10 "Oct")
			(11 "Nov")
			(12 "Dec")))
	(format nil "Version of ~D-~A-~D" date month year)))
  (setq *lisp-boot-form* '(boot-initialize))
  (setq *lisp-boot-message* (concatenate (quote string)
					 (if message message "")
					 " Common Lisp, "
					 (lisp-implementation-version)
					 ", (c) 1985, C. Hedrick"))
  (save file (concatenate (quote string)
			  (if message message "")
			  " Common Lisp, "
			  (lisp-implementation-version)
			  ", (c) 1985, C. Hedrick"))
  (exit))

(defun boot-initialize ()
;  (setq lisp::*lisp-boot-form* nil)
  (format t "~&~a" *lisp-boot-message*)
  (load "clisp:clisp.init" :verbose nil :if-does-not-exist nil)
  (load (make-pathname :name "clisp" :type "init"
		       :defaults (user-homedir-pathname))
	:verbose nil
	:if-does-not-exist nil)
  (lisp::restart-lisp))