From 86c79931b5564186f732eb0b290c771f73d1fc3d Mon Sep 17 00:00:00 2001
From: cer <cer>
Date: Tue, 24 Mar 1992 19:45:46 +0000
Subject: [PATCH] Initial revision

---
 misc/clos-preload.cl  | 36 ++++++++++++++++++++
 misc/compile-1.lisp   | 54 ++++++++++++++++++++++++++++++
 misc/compile-ol.lisp  | 28 ++++++++++++++++
 misc/dev-load-1.lisp  | 77 +++++++++++++++++++++++++++++++++++++++++++
 misc/dev-load-ol.lisp | 27 +++++++++++++++
 misc/make-stub-file   | 13 ++++++++
 xlib/load-xlib.lisp   | 57 ++++++++++++++++++++++++++++++++
 7 files changed, 292 insertions(+)
 create mode 100644 misc/clos-preload.cl
 create mode 100644 misc/compile-1.lisp
 create mode 100644 misc/compile-ol.lisp
 create mode 100644 misc/dev-load-1.lisp
 create mode 100644 misc/dev-load-ol.lisp
 create mode 100755 misc/make-stub-file
 create mode 100644 xlib/load-xlib.lisp

diff --git a/misc/clos-preload.cl b/misc/clos-preload.cl
new file mode 100644
index 00000000..f2ce1677
--- /dev/null
+++ b/misc/clos-preload.cl
@@ -0,0 +1,36 @@
+;; -*- mode: common-lisp; package: clos -*-
+;;
+;;				-[]-
+;; 
+;; copyright (c) 1985, 1986 Franz Inc, Alameda, CA  All rights reserved.
+;; copyright (c) 1986-1992 Franz Inc, Berkeley, CA  All rights reserved.
+;;
+;; The software, data and information contained herein are proprietary
+;; to, and comprise valuable trade secrets of, Franz, Inc.  They are
+;; given in confidence by Franz, Inc. pursuant to a written license
+;; agreement, and may be stored and used only in accordance with the terms
+;; of such license.
+;;
+;; Restricted Rights Legend
+;; ------------------------
+;; Use, duplication, and disclosure of the software, data and information
+;; contained herein by any agency, department or entity of the U.S.
+;; Government are subject to restrictions of Restricted Rights for
+;; Commercial Software developed at private expense as specified in FAR
+;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
+;; applicable.
+;;
+;; $fiHeader$
+
+
+(in-package :clos)
+
+(preload-forms)
+
+;; premake constructors
+(preload-constructors)
+
+;; fill generic function caches
+(precache-generic-functions)
+
+
diff --git a/misc/compile-1.lisp b/misc/compile-1.lisp
new file mode 100644
index 00000000..5c1d4387
--- /dev/null
+++ b/misc/compile-1.lisp
@@ -0,0 +1,54 @@
+;; -*- mode: common-lisp; package: user -*-
+;;
+;;				-[]-
+;; 
+;; copyright (c) 1985, 1986 Franz Inc, Alameda, CA  All rights reserved.
+;; copyright (c) 1986-1991 Franz Inc, Berkeley, CA  All rights reserved.
+;;
+;; The software, data and information contained herein are proprietary
+;; to, and comprise valuable trade secrets of, Franz, Inc.  They are
+;; given in confidence by Franz, Inc. pursuant to a written license
+;; agreement, and may be stored and used only in accordance with the terms
+;; of such license.
+;;
+;; Restricted Rights Legend
+;; ------------------------
+;; Use, duplication, and disclosure of the software, data and information
+;; contained herein by any agency, department or entity of the U.S.
+;; Government are subject to restrictions of Restricted Rights for
+;; Commercial Software developed at private expense as specified in FAR
+;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
+;; applicable.
+;;
+;; $fiHeader: compile-xm.lisp,v 1.6 92/03/10 10:13:13 cer Exp Locker: cer $
+
+(in-package :user)
+
+(setq *ignore-package-name-case* t)
+(set-case-mode :case-insensitive-lower)
+(setf *load-source-file-info* t)
+(setf *record-source-file-info* t)
+(setf *load-xref-info* nil)
+(setf *record-xref-info* nil)
+(setf (sys:gsgc-switch :print) t)
+(setf (sys:gsgc-switch :stats) t)
+
+(setq *compile-print* nil)
+
+(unless (find-package 'excl-defsystem)
+  (compile-file-if-needed "sys/defsystem")
+  (let ((*enable-package-locked-errors* nil))
+    (load "sys/defsystem")))
+
+
+
+(defun compile-it (sys)
+  (unless (errorset (defsys::find-system sys))
+    (load "sys/sysdcl"))
+  (defsys::compile-system sys :propagate t)
+  (tenuring
+   (defsys::load-system sys))
+  (compile-file-if-needed "test/test-suite")
+  (load "demo/sysdcl")
+  (defsys::compile-system 'clim-demo :propagate t))
+
diff --git a/misc/compile-ol.lisp b/misc/compile-ol.lisp
new file mode 100644
index 00000000..35aa48f8
--- /dev/null
+++ b/misc/compile-ol.lisp
@@ -0,0 +1,28 @@
+;; -*- mode: common-lisp; package: user -*-
+;;
+;;				-[]-
+;; 
+;; copyright (c) 1985, 1986 Franz Inc, Alameda, CA  All rights reserved.
+;; copyright (c) 1986-1991 Franz Inc, Berkeley, CA  All rights reserved.
+;;
+;; The software, data and information contained herein are proprietary
+;; to, and comprise valuable trade secrets of, Franz, Inc.  They are
+;; given in confidence by Franz, Inc. pursuant to a written license
+;; agreement, and may be stored and used only in accordance with the terms
+;; of such license.
+;;
+;; Restricted Rights Legend
+;; ------------------------
+;; Use, duplication, and disclosure of the software, data and information
+;; contained herein by any agency, department or entity of the U.S.
+;; Government are subject to restrictions of Restricted Rights for
+;; Commercial Software developed at private expense as specified in FAR
+;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
+;; applicable.
+;;
+;; $fiHeader: compile-xm.lisp,v 1.6 92/03/10 10:13:13 cer Exp Locker: cer $
+
+(in-package :user)
+
+(load "misc/compile-1")
+(compile-it 'openlook-clim)
diff --git a/misc/dev-load-1.lisp b/misc/dev-load-1.lisp
new file mode 100644
index 00000000..d9345bba
--- /dev/null
+++ b/misc/dev-load-1.lisp
@@ -0,0 +1,77 @@
+;; -*- mode: common-lisp; package: user -*-
+;;
+;;				-[]-
+;; 
+;; copyright (c) 1985, 1986 Franz Inc, Alameda, CA  All rights reserved.
+;; copyright (c) 1986-1991 Franz Inc, Berkeley, CA  All rights reserved.
+;;
+;; The software, data and information contained herein are proprietary
+;; to, and comprise valuable trade secrets of, Franz, Inc.  They are
+;; given in confidence by Franz, Inc. pursuant to a written license
+;; agreement, and may be stored and used only in accordance with the terms
+;; of such license.
+;;
+;; Restricted Rights Legend
+;; ------------------------
+;; Use, duplication, and disclosure of the software, data and information
+;; contained herein by any agency, department or entity of the U.S.
+;; Government are subject to restrictions of Restricted Rights for
+;; Commercial Software developed at private expense as specified in FAR
+;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
+;; applicable.
+;;
+;; $fiHeader: dev-load-xm.lisp,v 1.5 92/03/04 16:23:12 cer Exp Locker: cer $
+
+(excl::free (excl::malloc 131072))
+
+(setq *ignore-package-name-case* t)
+(set-case-mode :case-insensitive-lower)
+
+(tenuring
+   (let ((*load-source-file-info* t)
+	 (*load-xref-info* nil))
+     (let ((*enable-package-locked-errors* nil))
+       (load "sys/defsystem"))
+     (load "sys/sysdcl")))
+
+(defun load-it (sys)
+  
+  (tenuring 
+   (let ((*load-source-file-info* t)
+	 (*load-xref-info* nil)
+	 (excl:*global-gc-behavior* nil))
+     (ecase sys
+       (motif-clim
+	(load "climg.fasl")
+	(load "climxm.fasl")
+	(load "clim-debug.fasl"))
+       (openlook-clim
+	(load "climg.fasl")
+	(load "climol.fasl")
+	(load "clim-debug.fasl")))))
+
+  ;;-- What would be good is to mark the files in the system as having
+  ;;-- been loaded
+  
+  (compile-file-if-needed "test/test-suite")
+
+  (tenuring
+   (load "test/test-suite") 
+   (load "misc/clos-preload.fasl" :if-does-not-exist nil))
+
+  (load "demo/sysdcl")
+  (tenuring
+   (defsys::load-system 'clim-demo))
+  
+  (when (probe-file "/net/jeff/scm/4.1/sparc/src/code/")
+    (let ((sys::*require-search-list*
+	   (cons (make-pathname :directory "/net/jeff/scm/4.1/sparc/src/code/"
+				:type "fasl")
+		 sys::*require-search-list*))
+	  (sys::*load-search-list*
+	   (cons
+	    (make-pathname :directory "/net/jeff/scm/4.1/sparc/src/code/")
+	    sys::*load-search-list*)))
+      (tenuring (require :composer)))
+  
+    (set (intern :*clm-binary-directory* ':xtk) "/scm/4.1/sparc/src/")))
diff --git a/misc/dev-load-ol.lisp b/misc/dev-load-ol.lisp
new file mode 100644
index 00000000..90dcebef
--- /dev/null
+++ b/misc/dev-load-ol.lisp
@@ -0,0 +1,27 @@
+;; -*- mode: common-lisp; package: user -*-
+;;
+;;				-[]-
+;; 
+;; copyright (c) 1985, 1986 Franz Inc, Alameda, CA  All rights reserved.
+;; copyright (c) 1986-1991 Franz Inc, Berkeley, CA  All rights reserved.
+;;
+;; The software, data and information contained herein are proprietary
+;; to, and comprise valuable trade secrets of, Franz, Inc.  They are
+;; given in confidence by Franz, Inc. pursuant to a written license
+;; agreement, and may be stored and used only in accordance with the terms
+;; of such license.
+;;
+;; Restricted Rights Legend
+;; ------------------------
+;; Use, duplication, and disclosure of the software, data and information
+;; contained herein by any agency, department or entity of the U.S.
+;; Government are subject to restrictions of Restricted Rights for
+;; Commercial Software developed at private expense as specified in FAR
+;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
+;; applicable.
+;;
+;; $fiHeader: dev-load-xm.lisp,v 1.5 92/03/04 16:23:12 cer Exp Locker: cer $
+
+
+(load "misc/dev-load-1")
+(load-it 'openlook-clim)
diff --git a/misc/make-stub-file b/misc/make-stub-file
new file mode 100755
index 00000000..6d0e8fa7
--- /dev/null
+++ b/misc/make-stub-file
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+header=$1
+shift;
+echo $header
+echo "{"
+for file in $*; do
+	cat $file | sed -e 's/$/();/' -e 's/_//'
+done
+echo "}"
+
+
+
diff --git a/xlib/load-xlib.lisp b/xlib/load-xlib.lisp
new file mode 100644
index 00000000..33d2a61e
--- /dev/null
+++ b/xlib/load-xlib.lisp
@@ -0,0 +1,57 @@
+;; -*- mode: common-lisp; package: x11 -*-
+;;
+;;				-[]-
+;; 
+;; copyright (c) 1985, 1986 Franz Inc, Alameda, CA  All rights reserved.
+;; copyright (c) 1986-1992 Franz Inc, Berkeley, CA  All rights reserved.
+;;
+;; The software, data and information contained herein are proprietary
+;; to, and comprise valuable trade secrets of, Franz, Inc.  They are
+;; given in confidence by Franz, Inc. pursuant to a written license
+;; agreement, and may be stored and used only in accordance with the terms
+;; of such license.
+;;
+;; Restricted Rights Legend
+;; ------------------------
+;; Use, duplication, and disclosure of the software, data and information
+;; contained herein by any agency, department or entity of the U.S.
+;; Government are subject to restrictions of Restricted Rights for
+;; Commercial Software developed at private expense as specified in FAR
+;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
+;; applicable.
+;;
+;; $fiHeader$
+
+
+(in-package :x11)
+
+(defmacro symbols-from-file (file)
+  (with-open-file (s file :direction :input)
+    (do ((r nil)
+	 (l (read-line s nil nil) (read-line s nil nil)))
+	((null l)
+	 `(quote ,r))
+      (push l r))))
+
+
+(defun load-undefined-symbols-from-library (what kludges libraries)
+  (setq what (remove-if #'ff::get-entry-point what))
+  (when what
+    (mapc #'foreign-functions:remove-entry-point kludges)
+    (load "" 
+	  :unreferenced-lib-names what
+	  :foreign-files libraries
+	  :print t)))
+
+(defvar *libx11-pathname* "/usr/motif/usr/lib/libX11.a")
+
+(defun load-from-xlib ()
+  (x11::load-undefined-symbols-from-library
+   (list* "_XCopyGC" (x11::symbols-from-file "misc/undefinedsymbols"))
+   '("__unpack_quadruple" 
+     "__prod_b10000" 
+     "__carry_out_b10000" 
+     "__prod_65536_b10000")
+   (list x11::*libx11-pathname*)))
+
+(load-from-xlib)
-- 
GitLab