From 59ee7a1f64f1e4fbf880e5aa0ff20781e909da23 Mon Sep 17 00:00:00 2001 From: chiles <chiles> Date: Mon, 10 Jun 1991 16:59:22 +0000 Subject: [PATCH] Removed the EXT:GET-STREAM-COMMAND stuff to put it in code:stream.lisp. --- hemlock/ts-stream.lisp | 49 +----------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/hemlock/ts-stream.lisp b/hemlock/ts-stream.lisp index 1104accbd..4c1f34d2d 100644 --- a/hemlock/ts-stream.lisp +++ b/hemlock/ts-stream.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/ts-stream.lisp,v 1.1.1.7 1991/05/27 13:49:02 chiles Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/ts-stream.lisp,v 1.1.1.8 1991/06/10 16:59:22 chiles Exp $") ;;; ;;; ********************************************************************** ;;; @@ -19,53 +19,6 @@ (in-package "HEMLOCK") - -;;;; Public interface from "EXTENSIONS" package. - -(in-package "EXT") - -(export '(get-stream-command stream-command stream-command-p stream-command-name - stream-command-args make-stream-command)) - -(defstruct (stream-command (:print-function print-stream-command) - (:constructor make-stream-command - (name &optional args))) - (name nil :type symbol) - (args nil :type list)) - -(defun print-stream-command (obj str n) - (declare (ignore n)) - (format str "#<Stream-Cmd ~S>" (stream-command-name obj))) - - -;;; GET-STREAM-COMMAND -- Public. -;;; -;;; We can't simply call the stream's misc method because because nil is an -;;; ambiguous return value: does it mean text arrived, or does it mean the -;;; stream's misc method had no :get-command implementation. We can't return -;;; nil until there is text input. We don't need to loop because any stream -;;; implementing :get-command would wait until it had some input. If the -;;; LISTEN fails, then we have some random stream we must wait on. -;;; -(defun get-stream-command (stream) - "This takes a stream and waits for text or a command to appear on it. If - text appears before a command, this returns nil, and otherwise it returns - a command." - (let ((cmdp (funcall (lisp::stream-misc stream) stream :get-command))) - (cond (cmdp) - ((listen stream) - nil) - (t - ;; This waits for input and returns nil when it arrives. - (unread-char (read-char stream) stream))))) - - - -;;;; Package for rest of file. - -(in-package "HEMLOCK") - - ;;;; Ts-streams. -- GitLab