[Git][cmucl/cmucl][upstream-clx] Import upstream clx version 0.7.5-19-g623c339

Raymond Toy gitlab at common-lisp.net
Sun Dec 16 23:59:11 UTC 2018


Raymond Toy pushed to branch upstream-clx at cmucl / cmucl


Commits:
60bde987 by Raymond Toy at 2018-12-16T23:58:32Z
Import upstream clx version 0.7.5-19-g623c339

Straight copy of sharplispers/clx commit 623c339

- - - - -


4 changed files:

- src/clx/README-CMUCL
- src/clx/depdefs.lisp
- src/clx/dependent.lisp
- src/clx/manual/clx.texinfo


Changes:

=====================================
src/clx/README-CMUCL
=====================================
@@ -1,40 +1,9 @@
-$Id: README-CMUCL,v 1.2 2009/06/11 16:03:56 rtoy Rel $
+This is an import of Telent-CLX from the fork
+https://github.com/sharplispers/clx, version
+6e39a0df2a0a1d083166f405d4b8bbc463d54d85.
 
-This is an import of Telent-CLX as of 0.7.3.
+All (almost?) files are included.  A few changes to fix bugs related
+to CMUCL have been added, as well as the CVS id.  I've tried to make
+few changes so it will be easy to merge again when desired.
 
-All files are included.  A few changes to fix bugs related to CMUCL
-have been added, as well as the CVS id.  I've tried to make few
-changes so it will be easy to merge again when desired.
-
-The following files from this directory are compiled and loaded by
-CMUCL when it builds utilities:
-
-clx-library.lisp
-package.lisp
-depdefs.lisp
-clx.lisp
-dependent.lisp
-macros.lisp
-bufmac.lisp
-buffer.lisp
-display.lisp
-gcontext.lisp
-input.lisp
-requests.lisp
-fonts.lisp
-graphics.lisp
-text.lisp
-attributes.lisp
-translate.lisp
-keysyms.lisp
-manager.lisp
-image.lisp
-resource.lisp
-shape.lisp
-big-requests.lisp
-xvidmode.lisp
-xrender.lisp
-glx.lisp
-gl.lisp
-dpms.lisp
-provide.lisp
+See src/tools/clxcom.lisp to see what files are compiled.


=====================================
src/clx/depdefs.lisp
=====================================
@@ -387,9 +387,7 @@
   ;; FIXME: maybe we should reevaluate this?
   (defvar *def-clx-class-use-defclass*
     #+(or Genera allegro) t
-    #+(and cmu pcl) '(XLIB:DRAWABLE XLIB:WINDOW XLIB:PIXMAP)
-    #+(and cmu (not pcl)) nil
-    #-(or Genera cmu allegro) nil
+    #-(or Genera allegro) nil
     "Controls whether DEF-CLX-CLASS uses DEFCLASS.
 
 If it is a list, it is interpreted by DEF-CLX-CLASS to be a list of


=====================================
src/clx/dependent.lisp
=====================================
@@ -884,6 +884,47 @@
    :element-type '(unsigned-byte 8)
    :input t :output t :buffering :none))
 
+#+cmu
+(defun open-x-stream (host display protocol)
+  (let ((stream-fd
+         (ecase protocol
+           ;; establish a TCP connection to the X11 server, which is
+           ;; listening on port 6000 + display-number
+           ((:internet :tcp nil)
+            (let ((fd (ext:connect-to-inet-socket host (+ *x-tcp-port* display))))
+              (unless (plusp fd)
+                (error 'connection-failure
+                       :major-version *protocol-major-version*
+                       :minor-version *protocol-minor-version*
+                       :host host
+                       :display display
+                       :reason (format nil "Cannot connect to internet socket: ~S"
+                                       (unix:get-unix-error-msg))))
+              fd))
+           ;; establish a connection to the X11 server over a Unix
+           ;; socket.  (:|| comes from Darwin's weird DISPLAY
+           ;; environment variable)
+           ((:unix :local :||)
+            (let ((path (unix-socket-path-from-host host display)))
+              (unless (probe-file path)
+                (error 'connection-failure
+                       :major-version *protocol-major-version*
+                       :minor-version *protocol-minor-version*
+                       :host host
+                       :display display
+                       :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
+                         :major-version *protocol-major-version*
+                         :minor-version *protocol-minor-version*
+                         :host host
+                         :display display
+                         :reason (format nil "Can't connect to unix socket: ~S"
+                                         (unix:get-unix-error-msg))))
+                fd))))))
+    (system:make-fd-stream stream-fd :input t :output t :element-type '(unsigned-byte 8))))
+
 ;;; BUFFER-READ-DEFAULT for CMU Common Lisp.
 ;;;
 ;;;    If timeout is 0, then we call LISTEN to see if there is any input.
@@ -1643,7 +1684,7 @@ Returns a list of (host display-number screen protocol)."
 (defmacro with-underlying-simple-vector
     ((variable element-type pixarray) &body body)
   (declare (ignore element-type))
-  `(#+cmu kernel::with-array-data #+sbcl sb-kernel:with-array-data
+  `(#+cmu lisp::with-array-data #+sbcl sb-kernel:with-array-data
           ((,variable ,pixarray) (start) (end))
           (declare (ignore start end))
           , at body))
@@ -1762,11 +1803,11 @@ Returns a list of (host display-number screen protocol)."
                       height width)
   (declare (type array-index source-width sx sy dest-width dx dy height width))
   #.(declare-buffun)
-  (kernel::with-array-data ((sdata source)
+  (lisp::with-array-data ((sdata source)
                             (sstart)
                             (send))
     (declare (ignore send))
-    (kernel::with-array-data ((ddata dest)
+    (lisp::with-array-data ((ddata dest)
                               (dstart)
                               (dend))
       (declare (ignore dend))


=====================================
src/clx/manual/clx.texinfo
=====================================
@@ -15162,11 +15162,11 @@ a keycode.
 
 @item
 Convert the keycode into its corresponding keysym, based on the
-current keyboard mapping. See @var{keycode->keysym}.
+current keyboard mapping. See @var{keycode->keysym}.
 
 @item
 Convert the keysym into the corresponding Common Lisp character. See
- at var{keysym->character}.
+ at var{keysym->character}.
 @end enumerate
 
 @menu



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/60bde987869e73a25475727ac73579cf927f6738

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/60bde987869e73a25475727ac73579cf927f6738
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20181216/2ae26f92/attachment-0001.html>


More information about the cmucl-cvs mailing list