-/nick;;;; Inspector for sb-aclrepl
+;;;; Inspector for sb-aclrepl
;;;;
;;;; The documentation, which may or may not apply in its entirety at
;;;; any given time, for this functionality is on the ACL website:
cons cells and LIST-TYPE is :normal, :dotted, or :cyclic"
(do ((length 1 (1+ length))
(lst (cdr object) (cdr lst)))
- ((or (not(consp lst))
+ ((or (not (consp lst))
(eq object lst))
(cond
((null lst)
(multiple-value-bind (length list-type) (cons-safe-length object)
(format nil "a ~A list with ~D element~:*~P~A"
(string-downcase (symbol-name list-type)) length
- (case list-type
+ (ecase list-type
((:dotted :cyclic) "+tail")
- (t "")))))
-
+ (:normal "")))))
(defun ref32-hexstr (obj &optional (offset 0))
(format nil "~8,'0X" (ref32 obj offset)))
(defun read-cmd (input-stream)
;; Reads a command from the user and returns a user-cmd object
- (let ((next-char (peek-char-non-whitespace input-stream)))
- (cond
- ((eql *command-char* next-char)
- (dispatch-command-line input-stream))
- ((eql #\newline next-char)
- (read-char input-stream)
- *null-cmd*)
- ((eql :eof next-char)
- *eof-cmd*)
- (t
- (let* ((eof (cons nil *eof-marker*))
- (form (read input-stream nil eof)))
- (if (eq form eof)
- *eof-cmd*
- (make-user-cmd :input form :func nil :hnum *cmd-number*)))))))
+ (let* ((next-char (peek-char-non-whitespace input-stream))
+ (cmd (cond
+ ((eql *command-char* next-char)
+ (dispatch-command-line input-stream))
+ ((eql #\newline next-char)
+ (read-char input-stream)
+ *null-cmd*)
+ ((eql :eof next-char)
+ *eof-cmd*)
+ (t
+ (let* ((eof (cons nil *eof-marker*))
+ (form (read input-stream nil eof)))
+ (if (eq form eof)
+ *eof-cmd*
+ (make-user-cmd :input form :func nil :hnum *cmd-number*)))))))
+ (if (and (eq cmd *eof-cmd*) (typep input-stream 'string-stream))
+ (throw 'repl-catcher cmd)
+ cmd)))
(defun dispatch-command-line (input-stream)
"Processes an input line that starts with *command-char*"
;;; 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.3.39"
+"0.8.3.40"