Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
59ee7a1f
Commit
59ee7a1f
authored
33 years ago
by
chiles
Browse files
Options
Downloads
Patches
Plain Diff
Removed the EXT:GET-STREAM-COMMAND stuff to put it in code:stream.lisp.
parent
3b24e0ba
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hemlock/ts-stream.lisp
+1
-48
1 addition, 48 deletions
hemlock/ts-stream.lisp
with
1 addition
and
48 deletions
hemlock/ts-stream.lisp
+
1
−
48
View file @
59ee7a1f
...
...
@@ -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/0
5/27 13:4
9:
0
2 chiles Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/ts-stream.lisp,v 1.1.1.
8
1991/0
6/10 16:5
9:
2
2 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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment