(c-> data-return "* char")
(c-> nitems-return "ulong")))
((= 8 actual-format)
- (c-peek-cstringp data-return))
+ (char-ptr-to-prop-data-8
+ (c-> data-return "* char")
+ (c-> nitems-return "ulong")))
(else
(error "Unexpected format:" actual-format))))))
(cleanup-alien! data-return)
(loop (1+ index)))))
result))
+(define (char-ptr-to-prop-data-8 data length)
+ (let ((scan (copy-alien data))
+ (result (make-string length)))
+ (let loop ((index 0))
+ (if (< index length)
+ (begin
+ (string-set! result index (ascii->char (c-> scan "uchar")))
+ (alien-byte-increment! scan (c-sizeof "uchar"))
+ (loop (1+ index)))))
+ result))
+
(define (x-change-property display window property type format mode data)
(guarantee-xdisplay display 'x-change-property)
(guarantee-Window window 'x-change-property)