Commit 5c7d917e authored by emarsden's avatar emarsden
Browse files

- the CLX build process no longer links to socket.o (functionality

   has been moved to Lisp)

 - fixes to error reporting on CLX connection attempts

 - fix bug in type declarations in TEXT-EXTENTS-SERVER and
   TEXT-WIDTH-SERVER (declared to be strings, but called with
   buffer-text16). From Daniel Barlow via the portable-clx-devel
   mailing list.
parent 88dfa44d
Loading
Loading
Loading
Loading
+2 −26
Changes for clx/defsystem.lisp: 2 added lines, 26 removed lines.
Original line number Diff line number Diff line
@@ -20,14 +20,12 @@
;;; implied warranty.
#+cmu
(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/defsystem.lisp,v 1.6 1999/03/16 23:37:38 pw Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/defsystem.lisp,v 1.7 2003/07/20 15:55:23 emarsden Exp $")

;;; #+ features used in this file
;;;   CMU

#+cmu
(lisp:in-package "XLIB")
#+cmu
(cl:in-package "XLIB")
(export 'load-clx)

(common-lisp:in-package :common-lisp-user)
@@ -56,27 +54,6 @@
;;; out correctly, but you may have to explicitly give the source and
;;; binary file types.

;;; An attempt at compiling the C language sources is also made,
;;; but you may have to set different compiler switches
;;; should be.  If it doesn't do the right thing, then do
;;;     (compile-clx "" "" :compile-c NIL)
;;; to prevent the compilation.

;;; compilation notes
;;;   lucid2.0/hp9000s300
;;;     must uudecode the file make-sequence-patch.uu

#+(or cmu)
(defun clx-foreign-files (binary-path)
  #+cmu
  (declare (ignore binary-path))
  #+cmu
  (alien:def-alien-routine ("connect_to_server" xlib::connect-to-server)
			   c-call:int
    (host c-call:c-string)
    (port c-call:int))
  )

(defun compile-clx (&optional
		    (source-pathname-defaults "")
		    (binary-pathname-defaults "")
@@ -190,7 +167,6 @@
	       (load binary))))

      (load-binary "package")
      #+(or cmu) (clx-foreign-files binary-path)
      (load-binary "depdefs")
      (load-binary "clx")
      (load-binary "dependent")
+6 −4
Changes for clx/dependent.lisp: 6 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
;;; express or implied warranty.
;;;
(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/dependent.lisp,v 1.14 2003/06/06 15:04:55 toy Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/dependent.lisp,v 1.15 2003/07/20 15:55:23 emarsden Exp $")

(in-package :xlib)

@@ -648,7 +648,8 @@
                :minor-version *protocol-minor-version*
                :host host
                :display display
                :reason "Cannot connect to internet socket"))
                :reason (format nil "Cannot connect to internet socket: ~S"
                                (unix:get-unix-error-msg))))
       (system:make-fd-stream fd :input t :output t :element-type '(unsigned-byte 8))))
     ;; establish a connection to the X11 server over a Unix socket
    (:unix
@@ -660,7 +661,7 @@
                :minor-version *protocol-minor-version*
                :host host
                :display display
                :reason "Unix socket ~s does not exist" path))
                :reason (format nil "Unix socket ~s does not exist" path)))
       (let ((fd (ext:connect-to-unix-socket (namestring path))))
         (unless (plusp fd)
           (error 'connection-failure
@@ -668,7 +669,8 @@
                :minor-version *protocol-minor-version*
                :host host
                :display display
                :reason "Can't connect to unix socket: ~S" (unix:get-unix-error-msg)))
                :reason (format nil "Can't connect to unix socket: ~S"
                                (unix:get-unix-error-msg))))
         (system:make-fd-stream fd :input t :output t :element-type '(unsigned-byte 8)))))))


+2 −2
Changes for clx/display.lisp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
;;;
#+cmu
(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/display.lisp,v 1.9 2002/07/22 17:10:56 toy Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/display.lisp,v 1.10 2003/07/20 15:55:23 emarsden Exp $")

(in-package :xlib)

@@ -333,7 +333,7 @@
			      (if (member host '("" "unix") :test #'equal)
				  :unix
				  protocol))))
  ;; PROTOCOL is the network protocol (something like :TCP :DNA or :CHAOS). See OPEN-X-STREAM.
  ;; PROTOCOL is the network protocol (something like :TCP or :UNIX).
  (let* ((stream (open-x-stream host display protocol))
	 (disp (make-buffer *output-buffer-size* #'make-display-internal
			    :host host :display display
+3 −3
Changes for clx/text.lisp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
;;;
#+cmu
(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/text.lisp,v 1.6 1999/03/16 23:37:49 pw Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/clx/text.lisp,v 1.7 2003/07/20 15:55:23 emarsden Exp $")

(in-package :xlib)

@@ -260,7 +260,7 @@

(defun text-extents-server (font string start end)
  (declare (type font font)
	   (type string string)
	   (type sequence string)
	   (type array-index start end))
  (declare (clx-values width ascent descent left right font-ascent font-descent direction))
  (let ((display (font-display font))
@@ -287,7 +287,7 @@

(defun text-width-server (font string start end)
  (declare (type (or font gcontext) font)
	   (type string string)
	   (type sequence string)
	   (type array-index start end))
  (declare (clx-values integer))
  (let ((display (font-display font))