[Git][cmucl/cmucl][issue-401-file-position-setter-wrong] 2 commits: Clean up debugging stuff

Raymond Toy pushed to branch issue-401-file-position-setter-wrong at cmucl / cmucl Commits: bb4b550f by Raymond Toy at 2025-05-08T07:27:54-07:00 Clean up debugging stuff Remove additional prints and turn off original debugging stuff by uncommenting the `#+nil` stuff. - - - - - 7b351a33 by Raymond Toy at 2025-05-08T07:41:22-07:00 Fix typos introduced in previous commits - - - - - 1 changed file: - src/code/fd-stream.lisp Changes: ===================================== src/code/fd-stream.lisp ===================================== @@ -1699,7 +1699,7 @@ (posn errno) (unix:unix-lseek (fd-stream-fd stream) 0 unix:l_incr) (declare (type (or (integer 0) null) posn)) - ;;#+nil + #+nil (format t "lseek returns ~D ~D~%" posn errno) (cond (posn ;; Adjust for buffered output: @@ -1720,7 +1720,7 @@ (decf posn (- (fd-stream-ibuf-tail stream) (fd-stream-ibuf-head stream))) - ;;#+nil + #+nil (format t "Updated posn = ~D~%" posn) #+unicode (when (fd-stream-string-buffer stream) @@ -1737,14 +1737,14 @@ ;; octet-count doesn't use that. Hence, ;; subtract one from string-index and ;; string-buffer-len. - ;;#+nil + #+nil (progn (format t "~&ocount = ~D~%" ocount) (format t "posn = ~D~%" posn)) (loop for k of-type fixnum from (1- (fd-stream-string-index stream)) below (1- (fd-stream-string-buffer-len stream)) do (decf posn (aref ocount k))) - ;;#+nil + #+nil (progn (format t "new posn = ~D~%" posn) (format t "in-buffer-length = ~D~%" in-buffer-length) @@ -1760,23 +1760,19 @@ ;; string-buffer and no in-buffer, then the ibuf ;; tail and head pointers contain all the ;; information needed. - ;;#+nil + #+nil (progn (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)) (format t "posn = ~A~%" posn)) (decf posn (- (fd-stream-in-length stream) - (fd-stream-in-index stream))) - (format t "After inbuffer update posn = ~A~%" posn)) - ;;#+nil + (fd-stream-in-index stream)))) + #+nil (format t "fd-stream-unread = ~S~%" (fd-stream-unread stream)) (when (fd-stream-unread stream) ;;@@ (decf posn)) ;; Divide bytes by element size. - (format t "posn = ~A, size = ~A, trunc = ~A~%" - posn (fd-stream-element-size stream) - (truncate posn (fd-stream-element-size stream))) (truncate posn (fd-stream-element-size stream))) ((eq errno unix:espipe) nil) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4b942f362924b4a6057480a... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4b942f362924b4a6057480a... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)