Skip to content
Snippets Groups Projects
Commit a1c04fe7 authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix ticket:79

 * Initialize in-length to in-buffer-length, not 0.
 * Added a few more debugging prints.
parent f51ee9dc
No related branches found
No related tags found
No related merge requests found
......@@ -260,7 +260,7 @@
;; in-buffer-length, but could be less if we reached the
;; end-of-file.
#+unicode
(in-length 0 :type index)
(in-length in-buffer-length :type index)
;;
;; Indicates how to handle errors when converting octets to
;; characters. If NIL, then the external format should handle it
......@@ -1697,6 +1697,8 @@
(posn errno)
(unix:unix-lseek (fd-stream-fd stream) 0 unix:l_incr)
(declare (type (or (integer 0) null) posn))
#+nil
(format t "lseek returns ~D ~D~%" posn errno)
(cond (posn
;; Adjust for buffered output:
;; If there is any output buffered, the *real* file position
......@@ -1716,6 +1718,8 @@
(decf posn (- (fd-stream-ibuf-tail stream)
(fd-stream-ibuf-head stream)))
#+nil
(format t "Updated posn = ~D~%" posn)
#+unicode
(when (fd-stream-string-buffer stream)
;; The string buffer contains Lisp characters,
......@@ -1742,6 +1746,7 @@
(progn
(format t "new posn = ~D~%" posn)
(format t "in-buffer-length = ~D~%" in-buffer-length)
(format t "in-length = ~D~%" (fd-stream-in-length stream))
(format t "fd-stream-in-index = ~D~%" (fd-stream-in-index stream))))))
(when (fd-stream-in-buffer stream)
;; When we have an in-buffer (whether we have a
......
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