forward-referenced superclasses. (thanks to Gerd Moellmann)
* fixed evaluation order in optional entries. (reported by Gilbert
Baumann)
+ * *STANDARD-INPUT* is now
* SB-MOP:ENSURE-CLASS-USING-CLASS now takes its arguments in the
specified-by-AMOP order of (CLASS NAME &REST ARGS &KEY).
* fixed bug 20: DEFMETHOD can define methods using names that are
(fd-stream-element-type fd-stream))
(:interactive-p
;; FIXME: sb!unix:unix-isatty is undefined.
- (sb!unix:unix-isatty (fd-stream-fd fd-stream)))
+ (= 1 (the (member 0 1)
+ (sb!unix:unix-isatty (fd-stream-fd fd-stream)))))
(:line-length
80)
(:charpos
(stream-reinit)
(setf *terminal-io* (make-synonym-stream '*tty*))
(setf *standard-output* (make-synonym-stream '*stdout*))
- (setf *standard-input*
- (#!-high-security
- ;; FIXME: Why is *STANDARD-INPUT* a TWO-WAY-STREAM? ANSI says
- ;; it's an input stream.
- make-two-way-stream
- #!+high-security
- %make-two-way-stream (make-synonym-stream '*stdin*)
- *standard-output*))
+ (setf *standard-input* (make-synonym-stream '*stdin*))
(setf *error-output* (make-synonym-stream '*stderr*))
(setf *query-io* (make-synonym-stream '*terminal-io*))
(setf *debug-io* *query-io*)
(defconstant l_incr 1) ; to increment the file pointer
(defconstant l_xtnd 2) ; to extend the file size
+;;; Is a stream interactive?
+(defun unix-isatty (fd)
+ (declare (type unix-fd fd))
+ (int-syscall ("isatty" int) fd))
+
;;; Accept a file descriptor and move the file pointer ahead
;;; a certain offset for that file. WHENCE can be any of the following:
;;; L_SET Set the file pointer.
(!def-primitive-type simple-array-complex-long-float (descriptor-reg)
:type (simple-array (complex long-float) (*)))
-;;; Note: The complex array types are not included, 'cause it is pointless to
-;;; restrict VOPs to them.
+;;; Note: The complex array types are not included, 'cause it is
+;;; pointless to restrict VOPs to them.
;;; other primitive other-pointer types
(!def-primitive-type system-area-pointer (sap-reg descriptor-reg))
\f
;;;; PRIMITIVE-TYPE-OF and friends
-;;; Return the most restrictive primitive type that contains Object.
+;;; Return the most restrictive primitive type that contains OBJECT.
(/show0 "primtype.lisp 147")
(!def-vm-support-routine primitive-type-of (object)
(let ((type (ctype-of object)))
(with-input-from-string (q "foo")
(let* ((r (make-concatenated-stream p q)))
(peek-char nil r))))
+
+;; 0.7.14 and previous SBCLs don't have a working INTERACTIVE-STREAM-P
+;; because it called UNIX-ISATTY, which wasn't defined.
+(with-input-from-string (s "a non-interactive stream")
+ (assert (not (interactive-stream-p s))))
+;;; KLUDGE: Unfortunately it's hard to find a reliably interactive
+;;; stream to test, since it's reasonable for these tests to be run
+;;; from a script, conceivably even as something like a cron job.
+;;; Ideas?
+#+nil (assert (eq (interactive-stream-p *terminal-io*) t))
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre8.48"
+"0.pre8.49"