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
58696f5b
Commit
58696f5b
authored
33 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Added :EOF support in listen method, and fixed a few comments.
parent
603858d9
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
code/fd-stream.lisp
+7
-5
7 additions, 5 deletions
code/fd-stream.lisp
with
7 additions
and
5 deletions
code/fd-stream.lisp
+
7
−
5
View file @
58696f5b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.1
1
1991/05/18 1
3:38:36
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.1
2
1991/05/18 1
9:06:01
ram Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -37,14 +37,15 @@
...
@@ -37,14 +37,15 @@
;;;; Buffer manipulation routines.
;;;; Buffer manipulation routines.
(
defvar
*available-buffers*
()
(
defvar
*available-buffers*
()
"List of available buffers. Each buffer is an dynamic alien."
)
"List of available buffers. Each buffer is an sap pointing to
bytes-per-buffer of memory."
)
(
defconstant
bytes-per-buffer
(
*
4
1024
)
(
defconstant
bytes-per-buffer
(
*
4
1024
)
"Number of bytes per buffer."
)
"Number of bytes per buffer."
)
;;; NEXT-AVAILABLE-BUFFER -- Internal.
;;; NEXT-AVAILABLE-BUFFER -- Internal.
;;;
;;;
;;; Returns the next available
alien
buffer, creating one if necessary.
;;; Returns the next available buffer, creating one if necessary.
;;;
;;;
(
proclaim
'
(
inline
next-available-buffer
))
(
proclaim
'
(
inline
next-available-buffer
))
;;;
;;;
...
@@ -71,8 +72,8 @@
...
@@ -71,8 +72,8 @@
(
fd
-1
:type
fixnum
)
; The file descriptor
(
fd
-1
:type
fixnum
)
; The file descriptor
(
buffering
:full
)
; One of :none, :line, or :full
(
buffering
:full
)
; One of :none, :line, or :full
(
char-pos
nil
)
; Character position if known.
(
char-pos
nil
)
; Character position if known.
(
listen
nil
)
; T if we don't need to listen
(
listen
nil
)
; T if we don't need to listen
. :EOF if we hit
; EOF.
;; The input buffer.
;; The input buffer.
(
unread
nil
)
(
unread
nil
)
(
ibuf-sap
nil
)
(
ibuf-sap
nil
)
...
@@ -452,6 +453,7 @@
...
@@ -452,6 +453,7 @@
stream
stream
(
mach:get-unix-error-msg
errno
))))
(
mach:get-unix-error-msg
errno
))))
((
zerop
count
)
((
zerop
count
)
(
setf
(
fd-stream-listen
stream
)
:eof
)
(
throw
'eof-input-catcher
nil
))
(
throw
'eof-input-catcher
nil
))
(
t
(
t
(
incf
(
fd-stream-ibuf-tail
stream
)
count
))))))
(
incf
(
fd-stream-ibuf-tail
stream
)
count
))))))
...
...
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