;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:10; Patch-File:T -*-
;;; Patch file for System version 126.44
;;; Reason:
;;;  The Fixup code for the in-core datastructures for systems in patch
;;;    System 126.38 didn't find some transformation types salted away
;;;    in the dependencies lists for component systems (sigh). Fix them
;;;    up harder.
;;; Written 11-Aug-88 20:55:32 by RWK at site Gigamos Cambridge
;;; while running on Claude Debussy from band 2
;;; with Experimental System 126.43, ZWEI 125.15, ZMail 73.2, Local-File 75.2, File-Server 24.1, Unix-Interface 13.0, Tape 24.2, Lambda-Diag 17.0, microcode 1762, SDU Boot Tape 3.14, SDU ROM 102, Kenvironment Loaded 8/2/88.


;;; -*- Mode:LISP; Package:SYSTEM-INTERNALS; Base:10; Readtable:ZL -*-
; From modified file DJ: L.SYS2; MAKSYS.LISP#211 at 11-Aug-88 01:45:24
#8R SYSTEM-INTERNALS#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "SYSTEM-INTERNALS")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: SYS2; MAKSYS  "

;;; Patch-file only
(defun fixup-existing-systems ()
  (loop for sys in *systems-list*
	do
	(typecase sys
	  (system
	   (loop for trans in (system-transformations sys)
		 for type = (transformation-transformation-type trans)
		 for ntype = (assoc (car type) *transformation-type-alist*)
		 for deps = (transformation-dependencies trans)
		 do
		 (setf (transformation-dependencies trans)
		       (loop for dep in deps
			     for ndep = (typecase dep
					    (list
					     (destructuring-bind (dtype &rest args) dep
						 (let ((ndtype
							 (assoc (car dtype) *transformation-type-alist*)))
						   (unless ndtype
						     (cerror "Do the rest of the transformations."
							     "Missing transformation type: ~S." (car dtype))
						     (setq ndtype dtype))
						   `(,ndtype ,@args))))
					    (otherwise dep))
			     collect ndep))
		 (if (not ntype)
		     (cerror "Do the rest of the transformations."
			     "Missing transformation type: ~S." (car type))
		   (setf (transformation-transformation-type trans) ntype)))))))

(fixup-existing-systems)
))