so that each expands into only one top-level form in a
:LOAD-TOPLEVEL context; this appears to decrease fasl sizes by
approximately 10%.
+ * fixed some bugs revealed by Paul Dietz' test suite:
+ ** FILE-POSITION works as specified on BROADCAST-STREAMs.
planned incompatible changes in 0.8.x:
* (not done yet, but planned:) When the profiling interface settles
((null streams) res)
(when (null (cdr streams))
(setq res (stream-element-type (car streams)))))))
+ (:file-position
+ (if arg1
+ (let ((res (or (eql arg1 :start) (eql arg1 0))))
+ (dolist (stream streams res)
+ (setq res (file-position stream arg1))))
+ (let ((res 0))
+ (dolist (stream streams res)
+ (setq res (file-position stream))))))
(:close
(set-closed-flame stream))
(t
(assert (char= (read-char s) #\1)))
(delete-file p))
\f
+;;; FILE-POSITION on broadcast-streams is mostly uncontroversial
+(assert (= 0 (file-position (make-broadcast-stream))))
+(assert (file-position (make-broadcast-stream) :start))
+(assert (file-position (make-broadcast-stream) 0))
+(assert (not (file-position (make-broadcast-stream) 1)))
+(let ((s (make-broadcast-stream)))
+ (write-char #\a s)
+ (assert (not (file-position s 1)))
+ (assert (= 0 (file-position s))))
+
+(let ((p "broadcast-stream-test"))
+ (ignore-errors (delete-file p))
+ (with-open-file (f p :direction :output)
+ (let ((s (make-broadcast-stream f)))
+ (assert (= 0 (file-position s)))
+ (assert (file-position s :start))
+ (assert (file-position s 0))
+ (write-char #\a s)
+ (assert (= 1 (file-position s))) ; unicode...
+ (assert (file-position s 0))))
+ (delete-file p))
;;; success
(quit :unix-status 104)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.10.11"
+"0.8.10.12"