Commit 1398fd38 authored by Daniel Kochmański's avatar Daniel Kochmański

cleanup: purge clx

parent 29ab40fd
......@@ -29,7 +29,6 @@
and the directories
contrib/ ; User contributed extensions
examples/ ; Examples for the ECL usage
src/clx/ ; portable CLX library from Telent
Look the precise copyright of these extensions in the corresponding
files.
......
......@@ -53,7 +53,7 @@ libdir=@libdir@
TAR_CONTENTS=Makefile.in README.md LGPL ANNOUNCEMENT LICENSE doc \
configure src/c src/cmp src/clos src/CHANGELOG src/lsp src/doc \
src/h src/gmp src/config* src/install.sh src/Makefile.in \
src/util contrib/ src/clx src/gc src/*.in src/*.m4 src/gabriel \
src/util contrib/ src/gc src/*.in src/*.m4 src/gabriel \
src/tests/Makefile.in msvc examples
# ==================== Utility Programs for the Build ====================
......
......@@ -55,12 +55,6 @@
<entry><package>CMP</package></entry>
<entry>The compiler</entry>
</row>
<row>
<entry><package>XLIB</package></entry>
<entry><package>CLX</package></entry>
<entry><package>XLIB</package></entry>
<entry>CLX library for X-Windows</entry>
</row>
<row>
<entry><package>SB-BSD-SOCKETS</package></entry>
<entry></entry>
......@@ -86,12 +80,11 @@
<para>In <xref linkend="table.all-packages"/> we list all packages
available in &ECL;. The nicknames are aliases for a package. Thus,
<symbol>system:symbol</symbol> may be written as
<symbol>sys:symbol</symbol> or <symbol>si:symbol</symbol>. The module field
explains which library provides what package. For instance, the
<symbol>sys:symbol</symbol> or <symbol>si:symbol</symbol>. The module
field explains which library provides what package. For instance, the
<package>ASDF</package> is obtained when loading the
<package>ASDF</package> library with <code>(require 'asdf)</code>; and the
<package>XLIB</package> package when configuring and loading the
<package>CLX</package> library.</para>
<package>ASDF</package> library with <code>(require
'asdf)</code>.</para>
<xi:include href="ref_c_packages.xml" xpointer="ansi.packages.c-dict" xmlns:xi="http://www.w3.org/2001/XInclude"/>
......
......@@ -31,7 +31,6 @@
src/lsp/format.lsp ; CMUCL's format
and the directories
contrib/ ; User contributed extensions
src/clx/ ; portable CLX library from Telent
Look the precise copyright of these extensions in the corresponding
files.
......
......@@ -191,7 +191,6 @@
src/lsp/format.lsp ; CMUCL's format
and the directories
contrib/ ; User contributed extensions
src/clx/ ; portable CLX library from Telent
Look the precise copyright of these extensions in the corresponding
files.
......
......@@ -53,8 +53,6 @@ ECL_CMP =
ECL_ASDF =
# TCP support
ECL_SOCKETS =
# X Windows support
# ECL_CLX = 1
# Regression Tests support
ECL_RT =
# Defsystem support
......@@ -181,10 +179,6 @@ ECL_FEATURES = (cons :wants-asdf $(ECL_FEATURES))
ECL_MODULES = $(ECL_MODULES) sockets
ECL_FEATURES = (cons :wants-sockets $(ECL_FEATURES))
!endif
!ifdef ECL_CLX
ECL_MODULES = $(ECL_MODULES) clx
ECL_FEATURES = (cons :wants-clx $(ECL_FEATURES))
!endif
!ifdef ECL_RT
ECL_MODULES = $(ECL_MODULES) rt
ECL_FEATURES = (cons :wants-rt $(ECL_FEATURES))
......@@ -473,10 +467,10 @@ test2:
test3:
-mkdir stage2
cp -rf lsp clos cmp stage2
-for i in lsp cmp clos clx tk; do test -f lib$$i.a && mv lib$$i.a stage2; done
-for i in lsp cmp clos tk; do test -f lib$$i.a && mv lib$$i.a stage2; done
$(MAKE) clean_lisp
./ecl < compile.lsp
-for i in lsp clos cmp clx tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done | less
-for i in lsp clos cmp tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done | less
test:
$(MAKE) -C tests
$(MAKE) -C ansi-tests > ansi-tests/log
......
......@@ -30,21 +30,17 @@ FILTER = ..\c\cut$(EXE) "@PACKAGE_VERSION@" "$(ECL_VERSION)"
ECL = ../ecl
all: $(INFO_FILES) $(HTML_FILES) developers_manual user_manual clx_manual
all: $(INFO_FILES) $(HTML_FILES) developers_manual user_manual_manual
ecl.dvi: $(srcdir)/user.txi $(srcdir)/macros.txi clisp.sty ecl.sty
tex $(srcdir)/user.txi
ecldev.dvi: $(srcdir)/devel.txi $(srcdir)/macros.txi clisp.sty ecl.sty
tex $(srcdir)/devel.txi
clx.dvi: clx.texinfo
tex clx.texinfo
ecl.ps: ecl.dvi $(srcdir)/macros.txi
dvips -o $@ ecl.dvi
ecldev.ps: ecldev.dvi $(srcdir)/macros.txi
dvips -o $@ ecldev.dvi
clx.ps: clx.dvi
dvips -o $@ clx.dvi
install: all
IF NOT EXIST $(docdir) $(MKDIR) $(docdir)
......@@ -54,8 +50,6 @@ install: all
for %i in (ecldev\*) do $(CP) %i $(docdir)\ecldev
IF NOT EXIST $(docdir)\ecl $(MKDIR) $(docdir)\ecl
for %i in (ecl\*) do $(CP) %i $(docdir)\ecl
IF NOT EXIST $(docdir)\clx $(MKDIR) $(docdir)\clx
for %i in (clx\*) do $(CP) %i $(docdir)\clx
flatinstall: all
IF NOT EXIST $(docdir) $(MKDIR) $(docdir)
for %i in (LICENSE LGPL) do $(CP) $(top_srcdir)\..\%i $(docdir)
......@@ -64,8 +58,6 @@ flatinstall: all
for %i in (ecldev\*) do $(CP) %i $(docdir)\ecldev
IF NOT EXIST $(docdir)\ecl $(MKDIR) $(docdir)\ecl
for %i in (ecl\*) do $(CP) %i $(docdir)\ecl
IF NOT EXIST $(docdir)\clx $(MKDIR) $(docdir)\clx
for %i in (clx\*) do $(CP) %i $(docdir)\clx
uninstall:
for k in $(INFO_FILES); do \
......@@ -77,7 +69,7 @@ uninstall:
rm -r $(infodir)/ecl.$(INFOEXT) $(infodir)/ecldev.$(INFOEXT); \
rm $(mandir)/man$(manext)/ecl.$(manext)
head2: developers_manual user_manual clx_manual $(srcdir)/head Makefile
head2: developers_manual user_manual manual $(srcdir)/head Makefile
IF EXIST ecl\index.html ( \
..\c\cut.exe "ecl/user.html" "ecl/index.html" \
"ecldev/devel.html" "ecldev/index.html" \
......@@ -89,16 +81,10 @@ ecl.info.gz: ecl.info
gzip < ecl.info > ecl.info.gz
ecldev.info.gz: ecldev.info
gzip < ecldev.info > ecldev.info.gz
clx.info.gz: clx.info
gzip < clx.info > clx.info.gz
ecl.info: $(srcdir)/user.txi $(srcdir)/macros.txi
makeinfo -I $(srcdir) --no-split $(srcdir)/user.txi
ecldev.info: $(srcdir)/devel.txi $(srcdir)/macros.txi
makeinfo -I $(srcdir) --no-split $(srcdir)/devel.txi
clx.info: clx.texinfo
makeinfo --no-split clx.texinfo
clx.texinfo: $(top_srcdir)/clx/manual/clx.texinfo
cp $(top_srcdir)/clx/manual/clx.texinfo .
download.html: $(srcdir)/download.in.html head2
( type head2 $(srcdir)\download.in.html $(srcdir)\end ) | $(FILTER) > $@
......@@ -152,11 +138,6 @@ developers_manual: $(srcdir)/devel.txi $(srcdir)/macros.txi
IF NOT EXIST ecldev MKDIR ecldev
makeinfo -v -I $(srcdir) --html $(srcdir)/devel.txi
echo > developers_manual
clx_manual: $(srcdir)/../clx/manual/clx.texinfo
echo "Producing clx.html; ignore error messages."
IF NOT EXIST clx MKDIR clx
makeinfo -v --html $(srcdir)\..\clx\manual\clx.texinfo
echo > clx_manual
clean:
-for %i in (ecl ecldev clx ..\gabriel) do $(RMDIR) %i
-for %i in (ecl.info* ecldev.info* $(HTML_FILES) head2 user_manual developers_manual clx_manual ..\gabriel\BENCHMARK) do $(RM) %i
-for %i in (ecl ecldev ..\gabriel) do $(RMDIR) %i
-for %i in (ecl.info* ecldev.info* $(HTML_FILES) head2 user_manual developers_manual_manual ..\gabriel\BENCHMARK) do $(RM) %i
......@@ -249,8 +249,6 @@ typedef unsigned int uint32_t;
* FEATURES LINKED IN:
*/
/* CLX */
#define CLX 1
/* Locatives */
/* #undef LOCATIVE */
/* Use old MIT LOOP macro system */
......
......@@ -234,7 +234,7 @@ mostlyclean: clean_lisp
$(RM) *.c *.o *.a *.eclh *.h *.data *.fas *.dat *.la *.so *.dylib
clean_lisp:
-$(RM) help.doc $(TARGETS)
-for i in lsp cmp clos clx tk ext; do $(RM) lib$$i.a $$i/?*.{o,eclh,data,c,sdat,h,fas}; done
-for i in lsp cmp clos tk ext; do $(RM) lib$$i.a $$i/?*.{o,eclh,data,c,sdat,h,fas}; done
distclean: clean
realclean: distclean
#
......@@ -261,10 +261,10 @@ selfbuild:
exit 2
test -d stage2 || mkdir stage2
cp -rf lsp clos cmp stage2
-for i in lsp cmp clos clx tk; do test -f lib$$i.a && mv lib$$i.a stage2; done
-for i in lsp cmp clos tk; do test -f lib$$i.a && mv lib$$i.a stage2; done
$(MAKE) clean_lisp
./ecl compile
-for i in lsp clos cmp clx tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done | less
-for i in lsp clos cmp tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done | less
.git/tags:
( cd $(srcdir)/../.git && which ctags && ctags -f tags -R --langmap=c:+.d ../src ) || echo "tags generation failed, but this does not break the build."
......
Details of changes since R5:
NOTE: this file is not updated any more. Changes since checking into
version control can be found from darcs in some way shape or form.
There may however be some Dark Ages between when this file was last
updated and the version that was the initial version control checkin.
Changes in CLX 5.02:
Replace LCL:ENVIRONMENT-VALUE with LCL:ENVIRONMENT-VARIABLE.
Fix a declaration in the DEFINE-ERROR macro.
Quote type argument to TYPE-CHECK consistently.
Changes in CLX 5.01:
Support for MIT-MAGIC-COOKIE-1 authorization has been added.
All VALUES declarations have been changed to CLX-VALUES declarations.
VALUES is a CL type name and cannot be used as a declaration name.
All ARRAY-REGISTER declarations have been removed as Genera no longer
needs them.
Many type declarations have been corrected or tightened up now that some
Lisps look at them.
Print functions have been defined for bitmap and pixmap formats.
The DISPLAY-PLIST slot will be initialized to NIL.
When debugging, don't optimize SPEED in the buffer macros.
Make the CARD8<->CHAR and the window manager code work for sparse
character sets (where some codes do not have corresponding characters).
The default gcontext extension set and copy functions will take the
correct number of arguments.
PUT-IMAGE will now work for 24-bit images.
The buffer accessors for MEMBER8, etc., will use the standard mechanisms
for reporting type errors.
Typographical errors in SET-WM-PROPERTIES, SET-STANDARD-COLORMAP, and
POINTER-CONTROL have been fixed.
Symbolics systems will do lazy macroexpansion in the buffer macros.
A variety of changes for Symbolics Minima systems have been made.
Some system-dependent code has been added for CMU Common Lisp.
-*- Text -*-
-- Changes in telent CLX 0.7.3, Tue Mar 28 2006 ---
Support for Allegro CL (6.2 and later) (Mikel Evins)
Latin 1 keysyms (Christophe Rhodes)
Some protocol fixes (Douglas Crosher)
Define a RENDER-OP typ (Douglas Crosher)
--- Changes in SBCL CLX 0.7.2, Tue Jan 10 2006 ---
OpenMCL fixes
DPMS extension support
Xauthority ipv6 parsing fixes
Thanks to Bryan O'Connor, Matthew Kennedy, Christophe Rhodes
--- Changes in SBCL CLX 0.7.1, Wed Aug 24 2005 ---
Works in SBCL 0.9.2 and newer.
--- Changes in SBCL CLX 0.7.0, Sun May 1 2005 ---
The SBCL support now depends on version 0.9.0 or greater.
--- Changes in SBCL CLX 0.6.1, Mon Mar 28 2005 ---
experimental GLX extension support (from Janis Dzerins)
The ICCCM-compliant selection handling in demo/clipboard.lisp is now
more ICCCM-compliant.
The implementation of the RENDER client protocol has been
enhanced. (Gilbert Baumann)
Bug fix: CIRCULATE-NOTIFY, CIRCULATE-REQUEST and PROPERTY-NOTIFY input
event descriptions have been fixed.
--- Changes in SBCL CLX 0.6, Tue Nov 16 2004 ---
A port to ECL has been merged (Juan Jose Garcia Ripoll)
With the addition of an implementation of DYNAMIC-EXTENT &REST lists
to SBCL, various functions (e.g. READ-INPUT, QUEUE-EVENT) in CLX
should cons less.
A Texinfo version of the CLX manual has been added (in manual/), thanks
to the work of Gilbert Baumann and Shawn Betts.
The portable-clx mailing list has been created for development discussion
and bug reports. See
http://lists.metacircles.com/cgi-bin/mailman/listinfo/portable-clx
A demonstration of ICCCM-compliant selection handling for select and paste
has been included in demo/clipboard.lisp
Bug fix: change the sizes of certain fields in a WM-SIZE-HINT to be 32
bits wide, as per the ICCCM specifications. Fixes a problem seen with
the MacOS X11 window manger, that uses very large hint values.
(Patch from Eric Marsden)
Bug fix: +POINTER-EVENT-MASK-VECTOR+ is supposed to be a vector of
keywords. It wasn't, but it is now. (Milan Zamazal)
Bug fix: xrender now compiles properly when *DEF-CLX-CLASS-USE-DEFCLASS*
(Milan again)
--- Changes in SBCL CLX 0.5.4, Tue Nov 11 00:02:43 2003 ---
A change in the implementation of PROCESS-BLOCK and PROCESS-WAKEUP
under multithreaded SBCL. Previous versions used queues and condition
variables, but this seems to have undesireable performance
characteristics; the newer version uses a polling loop calling
sched_yield() inside, which greatly improves responsiveness, but is
more CPU-hungry (as perceived by top(1), at least; in theory it
only hogs the CPU when nobody else wants it).
--- Changes in SBCL CLX 0.5.3, Sat Sep 6 12:14:39 UTC 2003 ---
We allow a PIXMAP-DEPTH of 12 in clx.lisp, despite not having any
image routines for it, to allow clx to load when running under eXceed.
Image routines are unlikely to work in such circumstances.
Bug fixes
* ERROR idiom (xvidmode.lisp)
* Add timestamp in NEWS file
--- Changes in SBCL CLX 0.5.2, about twenty minutes before 0.5.3 ---
OPEN-DEFAULT-DISPLAY now takes an optional argument for the display
name, which has the same "protocol/host:display.screen" format as used
by the C libX11 (XOpenDisplay). OPEN-DISPLAY is not actively
deprecated, but is much less useful by comparison
Inclusion of two new tests/demos (from Ingvar Mattson):
* demo/clclock: a simple clock application;
* demo/mandel: a Mandelbrot set viewer.
Bug fixes
* Fix bad type declarations in TEXT-EXTENTS-SERVER and
TEXT-WIDTH-SERVER (text.lisp)
* Fix FORMAT argument mismatch error in WRITE-BITMAP-FILE (image.lisp)
--- Changes in SBCL CLX 0.5.1, Wed Jun 25 14:20:31 BST 2003 ---
experimental RENDER extension support (from Gilbert Baumann)
note: the API to this is as yet unfinalized, as indeed the protocol
and specification appear to be in flux. Nevertheless,
feedback is welcome to the portable-clx-devel mailing list.
Bug fixes
* fix bugs in the image test: always draw glyphs in white on black
(not 1 on 0 -- i.e. dark red/blue on black in 24 bit truecolour);
don't abuse the X-HOT and Y-HOT slots for communicating persistent
information any more.
* Disable the "optimized" pixarray read/write routines, on the basis
that the newly fixed image test reveals that they are broken.
* fix type bugs in DEFINE-GCONTEXT-ACCESSOR, which previously
signalled a type error if :COPY-FUNCTION was not provided, and a
different type error if it was.
Other notes
* we use the SBCL extensions to the condition system to customize
compiler behaviour. As such, the system will only build without
breaking into the debugger using the supplied .asd, as we inhibit
error signalling from DEFCONSTANT; the benefits of this are easier
code sharing, as we minimize divergence within the clx source
proper from other implementations.
* we also use an SBCL extension to maximize efficiency: we set
SB-EXT:*DERIVE-FUNCTION-TYPES* to true for the duration of the
compilation of the clx library. Should functions in CLX be
redefined in a type-incompatible way, their callers in CLX (but not
outside) will need to be recompiled.
--- Changes in SBCL CLX 0.5, Fri May 30 01:16:34 BST 2003 ---
XFree86-VidModeExtension extension support (courtesy of Iban Hatchondo)
OPEN-DEFAULT-DISPLAY (opens display in $DISPLAY environment variable) exported
Implement CLX MP dependencies for SBCL: HOLDING-LOCK, PROCESS-BLOCK, etc
Many bug fixes
* asking for text extents on unchached fonts could potentially deadlock
http://article.gmane.org/gmane.lisp.clx.devel/16
* lots of compiler warnings, style-warnings, notes cleared up
Style and ANSI cleanups
* Much renaming of constants from *foo* to +foo+
* Change old-style COMPILE LOAD EVAL to new-style :COMPILE-TOPLEVEL
:LOAD-TOPLEVEL :EXECUTE in EVAL-WHENs.
This directory contains CLX, an X11 client library for Common
Lisp. The code was originally taken from a CMUCL distribution, was
modified somewhat in order to make it compile and run under SBCL, then
a selection of patches were added from other CLXes around the net.
= Features
- SHAPE extension support (Gilbert Baumann)
- XFREE86-VIDMODE extension support (Iban Hatchondo)
- experimental RENDER extension support
(Gilbert Baumann and Christian Sunesson)
- X authority support that works with ssh forwarding (Eric Marsden via CMUCL)
- OPEN-DEFAULT-DISPLAY function which, as the name suggests, does that (dan)
- various bug fixes (Iban Hatchondo and a cast of several)
- a manual in texinfo format (Shawn Betts, Gilbert Baumann)
= Compatibility
This CLX distribution is intended to work under the latest released
version of SBCL - please report the bug if it doesn't. It should
usually also work with earlier versions back to 0.9.0, and possibly
earlier still, but may need manual adjustment to the clx.asd file (to
remove use of newly-introduced features).
It has also been used as a basis for CLX ports on other Lisp
implementations, but these instructions are only good for SBCL. If
you're running something else, you need to know (a) that it builds
with asdf (and asdf-install, if the planets are in alignment) and
(b) what asdf is anyway. http://www.weitz.de/asdf-install/ might help
you there. If you've installed this using some non-SBCL Lisp, please
send mail describing the process so that future versions can incorporate
your instructions.
If you are following SBCL CVS and this CLX does not run in it, please
check the darcs repositor{y,ies} for this CLX distribution to see if
your bug has been fixed already.
darcs get http://verisons.telent.net/clx # version from which releases are made
http://common-lisp.net/~crhodes/clx # patches merged by Christophe
http://monday-monkey.com/repos/clx/ # OpenMCL tree by bryan o'connor?
= Building using asdf-install
* (require 'asdf)
* (require 'asdf-install)
* (asdf-install:install 'clx) ; download and install automatically, or
* (asdf-install:install "clx-x.y.z.tar.gz") ; if you've downloaded already
= Building by hand
If you don't trust asdf-install, here's how to do it manually -
1. Untar this tree somewhere
2. Add a symlink to clx.asd from one of the directories listed in your
asdf:*central-registry*
If that makes no sense to you yet, choose one of -
2a. personal installation:
$ cd $HOME/.sbcl/systems # you may have to create this directory
$ ln -s /path/to/clx/source/clx.asd .
2b. systemwide installations: you need to ask SBCL where it lives
$ sbcl --noinform --eval '(format t "~A~%" (posix-getenv "SBCL_HOME"))' </dev/null
/usr/local/lib/sbcl/
*
$ cd /usr/local/lib/sbcl/site-systems
$ ln -s /path/to/clx/source/clx.asd .
3.
* (require 'asdf)
* (require 'clx)
This will load all the files, after compiling anything that needs compiling
4. To test CLX (and get a small amount of Lisp advocacy), try loading
the file "demo/menu", and then executing the function
xlib::just-say-lisp.
* (load "clx/demo/menu")
* (xlib::just-say-lisp)
5. If you're new to Lisp, be advised that despite the examples in
demo/, it's generally /not/ considered good style to switch to the
:xlib package and write your code in it. Spend some time with a
language reference to familiarize yourself with USE-PACKAGE, or
better yet, the USE option to DEFPACKAGE.
= Known problems:
(none reported)
= Bug reports, new features, patches
Please send bug reports to the portable-clx list:
http://lists.metacircles.com/cgi-bin/mailman/listinfo/portable-clx
Note that your post will be held for approval if you are not subscribed.
-dan
--
Heavy lifting by <Raymond.Wiker at fast.no>
ASDFized version and ongoing by Daniel Barlow <dan at metacircles.com>
and (mostly, these days) Christophe Rhodes <csr21 at cam.ac.uk>
Original CLX README, retained for historical information
---
These files contain beta code, but they have been tested to some extent under
Symbolics, TI, Lucid and Franz. The files have been given .l suffixes to keep
them within 12 characters, to keep SysV sites happy. Please rename them with
more appropriate suffixes for your system.
For Franz systems, see exclREADME.
For Symbolics systems, first rename all the .l files to .lisp. Then edit your
sys.translations file so that sys:x11;clx; points to this directory and put a
clx.system file in your sys:site;directory that has the form
(si:set-system-source-file "clx" "sys:x11;clx;defsystem.lisp")
in it. After that CLX can be compiled with the "Compile System CLX" command
and loaded with the "Load System CLX" command.
For TI systems, rename all the .l files to .lisp, and make a clx.translations
file in your sys:site; directory pointing to this directory and a
sys:site;clx.system file like the one described for symbolics systems above,
but with the defsystem file being in the clx:clx; directory. Then CLX can be
compiled with (make-system "CLX" :compile :noconfirm) and loaded with
(make-system "CLX" :noconfirm).
For Lucid systems, you should rename all the .l files to .lisp too (This might
not be possible on SysV systems). After loading the defsystem.l file, CLX can
be compiled with the (compile-clx) function and loaded with the
(load-clx) form.
The ms-patch.uu file is a patch to Lucid version 2 systems. You probably
don't need it, as you are probably running Lucid version 3 or later, but if
you are still using Lucid version 2, you need this patch. You'll need to
uudecode it to produce the binary.
For kcl systems, after loading the defsystem.l file, CLX can be compiled with
the (compile-clx) function and loaded with the (load-clx) form.
For more information, see defsystem.l and provide.l.
This diff is collapsed.
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: XLIB; -*-
;;;
;;; (c) copyright 2006 Richard Kreuter
;;; (c) copyright 2007 by Christophe Rhodes
;;;
;;; Permission is granted to any individual or institution to use,
;;; copy, modify, and distribute this software, provided that this
;;; complete copyright and permission notice is maintained, intact, in
;;; all copies and supporting documentation.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(in-package "XLIB")
;;; No new events or errors are defined by this extension. (Big
;;; Requests Extension, section 3)
;;;
;;; The name of this extension is "BIG-REQUESTS" (Big Requests
;;; Extension, section 4)
(define-extension "BIG-REQUESTS")
(defun enable-big-requests (display)
(declare (type display display))
(let ((opcode (extension-opcode display "BIG-REQUESTS")))
(with-buffer-request-and-reply (display opcode nil)
((data 0))
(let ((maximum-request-length (card32-get 8)))
(setf (display-extended-max-request-length display)
maximum-request-length)))))
This diff is collapsed.
;;; -*- Mode: LISP; Syntax: Common-lisp; Package: XLIB; Base: 10; Lowercase: Yes -*-
;;; This file contains macro definitions for the BUFFER object for Common-Lisp
;;; X windows version 11
;;;
;;; TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
;;; AUSTIN, TEXAS 78769
;;;
;;; Copyright (C) 1987 Texas Instruments Incorporated.
;;;
;;; Permission is granted to any individual or institution to use, copy, modify,
;;; and distribute this software, provided that this complete copyright and
;;; permission notice is maintained, intact, in all copies and supporting
;;; documentation.
;;;
;;; Texas Instruments Incorporated provides this software "as is" without
;;; express or implied warranty.
;;;
(in-package :xlib)
;;; The read- macros are in buffer.lisp, because event-case depends on (most of) them.
(defmacro write-card8 (byte-index item)
`(aset-card8 (the card8 ,item) buffer-bbuf (index+ buffer-boffset ,byte-index)))
(defmacro write-int8 (byte-index item)
`(aset-int8 (the int8 ,item) buffer-bbuf (index+ buffer-boffset ,byte-index)))
(defmacro write-card16 (byte-index item)
#+clx-overlapping-arrays
`(aset-card16 (the card16 ,item) buffer-wbuf
(index+ buffer-woffset (index-ash ,byte-index -1)))
#-clx-overlapping-arrays
`(aset-card16 (the card16 ,item) buffer-bbuf
(index+ buffer-boffset ,byte-index)))
(defmacro write-int16 (byte-index item)
#+clx-overlapping-arrays
`(aset-int16 (the int16 ,item) buffer-wbuf
(index+ buffer-woffset (index-ash ,byte-index -1)))
#-clx-overlapping-arrays
`(aset-int16 (the int16 ,item) buffer-bbuf
(index+ buffer-boffset ,byte-index)))
(defmacro write-card32 (byte-index item)
#+clx-overlapping-arrays
`(aset-card32 (the card32 ,item) buffer-lbuf
(index+ buffer-loffset (index-ash ,byte-index -2)))
#-clx-overlapping-arrays
`(aset-card32 (the card32 ,item) buffer-bbuf
(index+ buffer-boffset ,byte-index)))
(defmacro write-int32 (byte-index item)
#+clx-overlapping-arrays
`(aset-int32 (the int32 ,item) buffer-lbuf
(index+ buffer-loffset (index-ash ,byte-index -2)))
#-clx-overlapping-arrays
`(aset-int32 (the int32 ,item) buffer-bbuf
(index+ buffer-boffset ,byte-index)))
(defmacro write-card29 (byte-index item)
#+clx-overlapping-arrays
`(aset-card29 (the card29 ,item) buffer-lbuf
(index+ buffer-loffset (index-ash ,byte-index -2)))
#-clx-overlapping-arrays
`(aset-card29 (the card29 ,item) buffer-bbuf
(index+ buffer-boffset ,byte-index)))
;; This is used for 2-byte characters, which may not be aligned on 2-byte boundaries
;; and always are written high-order byte first.
(defmacro write-char2b (byte-index item)
;; It is impossible to do an overlapping write, so only nonoverlapping here.
`(let ((%item ,item)
(%byte-index (index+ buffer-boffset ,byte-index)))
(declare (type card16 %item)
(type array-index %byte-index))
(aset-card8 (the card8 (ldb (byte 8 8) %item)) buffer-bbuf %byte-index)
(aset-card8 (the card8 (ldb (byte 8 0) %item)) buffer-bbuf (index+ %byte-index 1))))
(defmacro set-buffer-offset (value &environment env)
env
`(let ((.boffset. ,value))
(declare (type array-index .boffset.))
(setq buffer-boffset .boffset.)
#+clx-overlapping-arrays
,@(when (member 16 (macroexpand '(%buffer-sizes) env))
`((setq buffer-woffset (index-ash .boffset. -1))))
#+clx-overlapping-arrays
,@(when (member 32 (macroexpand '(%buffer-sizes) env))
`((setq buffer-loffset (index-ash .boffset. -2))))
#+clx-overlapping-arrays
.boffset.))
(defmacro advance-buffer-offset (value)
`(set-buffer-offset (index+ buffer-boffset ,value)))
(defmacro with-buffer-output ((buffer &key (sizes '(8 16 32)) length index) &body body)
(unless (listp sizes) (setq sizes (list sizes)))