File: eusrt.l

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (131 lines) | stat: -rw-r--r-- 3,593 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
;;
;; common eus has been built
;;

(setq *toplevel* (symbol-function 'eustop))

;;
;; initialize help system
;;
(in-package "LISP")

#|
(defmethod symbol
 (:global (v &optional doc)
    (setq vtype 2
	  value v)
    (if doc (putprop self doc :variable-documentation))
    v)
 )
|#

#+:Solaris2
(sys::exec-module-init "cyclic")

(make-package "HELP")
(in-package "HELP")
(sys::exec-module-init "helpsub" nil)
(sys::exec-module-init "eushelp" "llib/eushelp.l")

;;
;; load xwindow interface and libraries
;;
(alloc 30000)

;; (push :X.V11R3 *features*)
(push :X.V11R4 *features*)

(unless (find-package "IMAGE")
	(make-package "IMAGE" :nicknames '("IMG" "IP")) )

(in-package "IMAGE")
(use-package "GEOMETRY") 

(in-package "X")
;; (shadow 'gc)
;; initilize Xlib interface
(when (and 
       (or (substringp "sx" (pathname-name *program-name*)) (substringp "gl" (pathname-name *program-name*)))
	(sys::exec-module-init "xforeign" "xwindow/loadx.l")
#+(and :thread :x11r6.1)
	(InitThreads)
	)
      (unless (find-symbol "*XLIB*") ; for SunOS4 with .so bug
	      (sys::exec-module-init "Xdecl")
	      (sys::exec-module-init "Xgraphics")
	      (sys::exec-module-init "Xcolor")
	      (sys::exec-module-init "Xeus")
	      (sys::exec-module-init "Xevent")
	      (sys::exec-module-init "Xpanel")
	      (sys::exec-module-init "Xitem")
	      (sys::exec-module-init "Xtext")
	      (sys::exec-module-init "Xmenu")
	      (sys::exec-module-init "Xscroll")
	      (sys::exec-module-init "Xcanvas")
	      (sys::exec-module-init "Xtop")
	      (sys::exec-module-init "Xapplwin")
	      )
	(defun xflush () (x::flush x::*display*))
	(import '(x::xobject x::gcontext x::xdrawable x::xpixmap x::xwindow
		  x::colormap))
	(push :xwindow *features*)
	(push :Xlib    *features*)
        (if (unix:isatty 0) (terpri *error-output*))
        (when (unix:getenv "DISPLAY")
	    (x::init-xwindow)
	    (when  (and (unix:getenv "USE_FILEPANEL")
			(eq (read-from-string (unix:getenv "USE_FILEPANEL")) T))
	      (setq fp (instance x::filepanel :create))
#+(and :thread :x11r6.1)
	      (progn
		  (system:make-thread 4)
		  (x::window-main-thread))
	    )
	)
;; pixel-image 
;;
	(unless (find-symbol "*XLIB*") ; for SunOS4 with .so bug
		(in-package "IMAGE")
		(sys::exec-module-init "pixword")
		(sys::exec-module-init "RGBHLS")
		(sys::exec-module-init "convolve")
		(sys::exec-module-init "piximage")
		(sys::exec-module-init "pbmfile")
		(sys::exec-module-init "image_correlation")
;;
;	        (sys::exec-module-init "eusedge" nil)
;	        (sys::exec-module-init  "edgeobj" nil)
;	        (if (fboundp 'init-step2) (init-step2 line-edge-segment curved-edge-segment boundary region))
		)
	   (in-package "USER")
	   (use-package "IMAGE")
   )

;; opengl or Mesa
;;
(when   (substringp "gl" (pathname-name *program-name*))
   (load (format nil "~a/lib/eusglrt.l" *eusdir*)))

(in-package "USER")
(sys::exec-module-init "fstringdouble")
(import 'x::xflush)
(pushnew (format nil "~a/~a/lib/" *EUSDIR* 
		   (cond ((member :solaris2 *features*) "SunOS5")
			 ((member :IRIX *features*) "IRIX")
			 ((member :Linux *features*)
                          (if (member :x86_64 *features*)
                              "Linux64" "Linux"))
			 ((member :Cygwin *features*) "Cygwin")))
	 *load-path* 
	 :test #'equal )

(setq *load-verbose* nil)
(defparameter *user* (unix:getenv "USER"))

(if (probe-file (format nil "~A/lib/irtext.l" *eusdir*))
    (load (format nil "~A/lib/irtext.l" *eusdir*)))
(if (probe-file (format nil "~A/lib/eusext.l" *eusdir*))
    (load (format nil "~A/lib/eusext.l" *eusdir*)))

;;
t