Skip to content
Snippets Groups Projects
Commit c8054de1 authored by ram's avatar ram
Browse files

.../code/fd-stream.lisp, 08-Mar-90 17:58:17, Edit by Wlott.

  Yet another attempt at file-position.  Forgot to zero both the head and
  tail of the input buffer when we moved the file pointer.  Therefore, UNIX
  thought that the file pointer was at the beginning of the file, but LISP
  thought that the file pointer was ibuf-tail bytes in.
parent f33ae9d7
No related branches found
No related tags found
No related merge requests found
...@@ -923,6 +923,12 @@ ...@@ -923,6 +923,12 @@
(do () (do ()
((null (fd-stream-output-later stream))) ((null (fd-stream-output-later stream)))
(system:serve-all-events)) (system:serve-all-events))
;; Clear out any pending input to force the next read to go to the
;; disk.
(setf (fd-stream-unread stream) nil)
(setf (fd-stream-ibuf-head stream) 0)
(setf (fd-stream-ibuf-tail stream) 0)
;; Now move it.
(cond ((eq newpos :start) (cond ((eq newpos :start)
(setf offset 0 origin mach:l_set)) (setf offset 0 origin mach:l_set))
((eq newpos :end) ((eq newpos :end)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment