Re: xvidmode extension
Christophe Rhodes <[email protected]> Wed, 30 Apr 2003 09:58:09 +0100
| Newsgroups | gmane.lisp.clx.devel |
|---|---|
| Message-ID | <[email protected]> |
Christophe Rhodes <[email protected]> writes: > So probably what CLX meant was, when result-type is NIL, a NULL > result-type in the READ-SEQUENCE-CARD32 accessors? I haven't looked > at it very carefully yet, but it's quite possible that other bits of > CLX don't work for sbcl, either (anything that uses SEQUENCE-PUT > without specifying a RESULT-TYPE? Dunno). The attached patch makes it work for me. If anyone has any clx internals documentation, it would be interesting to know what the documentation for SEQUENCE-GET was: if the RESULT-TYPE argument is unprovided, is it meant to default to LIST? If so, then probably it ought to be explicit in DEFINE-ACCESSOR SEQUENCE, rather than implicit in the lisp implementation's treatment of (MAKE-SEQUENCE NIL <x>). Cheers, Christophe -- http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757 (set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b))) (defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge) _______________________________________________ Portable-clx-devel mailing list [email protected] http://clozure.com/cgi-bin/mailman/listinfo/portable-clx-devel
xvidmode.diff
(application/octet-stream, 3 KB)
? attributes.fasl
? buffer.fasl
? bufmac.fasl
? clx.fasl
? depdefs.fasl
? dependent.fasl
? display.fasl
? fonts.fasl
? gcontext.fasl
? graphics.fasl
? image.fasl
? input.fasl
? keysyms.fasl
? macros.fasl
? manager.fasl
? package.fasl
? requests.fasl
? resource.fasl
? shape.fasl
? text.fasl
? translate.fasl
? xvidmode.fasl
Index: xvidmode.lisp
===================================================================
RCS file: /usr/local/src/cvs/clx/xvidmode.lisp,v
retrieving revision 1.1
diff -u -r1.1 xvidmode.lisp
--- xvidmode.lisp 30 Apr 2003 08:40:50 -0000 1.1
+++ xvidmode.lisp 30 Apr 2003 08:54:50 -0000
@@ -262,7 +262,8 @@
(incf offset 4)
(setf (mode-info-privsize mode-info) size
(mode-info-private mode-info)
- (sequence-get :format card32 :index offset :length size))
+ (sequence-get :format card32 :index offset
+ :length size :result-type 'list))
mode-info))))
(defun xfree86-vidmode-get-all-mode-lines (dpy screen)
@@ -304,7 +305,8 @@
(setf size 0))
(setf (mode-info-privsize mode-info) size
(mode-info-private mode-info)
- (sequence-get :format card32 :index offset :length size))
+ (sequence-get :format card32 :index offset
+ :length size :result-type 'list))
(incf offset (* 4 size))
mode-info))))))
@@ -461,9 +463,12 @@
(off2 (+ off1 rep-size (* 2 (mod rep-size 2)))))
(declare (type fixnum off1 off2))
(values
- (sequence-get :format card16 :length (card16-get 8) :index 32)
- (sequence-get :format card16 :length (card16-get 8) :index off1)
- (sequence-get :format card16 :length (card16-get 8) :index off2)))))))
+ (sequence-get :format card16 :length (card16-get 8)
+ :index 32 :result-type 'list)
+ (sequence-get :format card16 :length (card16-get 8)
+ :index off1 :result-type 'list)
+ (sequence-get :format card16 :length (card16-get 8)
+ :index off2 :result-type 'list)))))))
(defun xfree86-vidmode-set-gamma-ramp (dpy scr size &key red green blue)
(declare (type (or null simple-vector) red green blue)
@@ -577,8 +582,9 @@
(nvsync (card8-get 11))
(vindex (+ 32 (* 4 (+ nhsync nvsync))))
(mindex (+ vindex vendor-name-length pad))
- (hsync (sequence-get :length nhsync :index 32))
- (vsync (sequence-get :length nvsync :index (+ 32 (* nhsync 4)))))
+ (hsync (sequence-get :length nhsync :index 32 :result-type 'list))
+ (vsync (sequence-get :length nvsync :index (+ 32 (* nhsync 4))
+ :result-type 'list)))
(declare (type card8 nhsync nvsync vendor-name-length model-name-length)
(type fixnum pad vindex mindex))
(values
@@ -645,7 +651,8 @@
(values
(card32-get 8) ; flags
(card32-get 16) ; max clocks
- (sequence-get :length (card32-get 12) :format card32 :index 32))))
+ (sequence-get :length (card32-get 12) :format card32
+ :index 32 :result-type 'list))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; ;;;;