We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For streams with non-byte ELEMENT-TYPE, FILE-POSITION reports wrong values after the I/O buffer is advanced:
ELEMENT-TYPE
FILE-POSITION
? (with-open-file (f "/dev/zero" :direction :input :element-type '(unsigned-byte 32)) (loop for i below 2000 do (read-byte f) collect (file-position f))) (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54\ 55 56 57 58 59 60 61 62 63 16 17 18 19 20 21 22 23 ...
? (with-open-file (f "/dev/zero" :direction :input :element-type '(unsigned-byte 32))
(loop for i below 2000
do (read-byte f)
collect (file-position f)))
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54\ 55 56 57 58 59 60 61 62 63 16 17 18 19 20 21 22 23 ...
This happens because element size is not properly accounted for in input-file-ioblock-advance. Patch proposal attached.
input-file-ioblock-advance
file-position-patch.zip
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered:
Fix to issue Clozure#181, file-position returning wrong values
ad6b4b5
No branches or pull requests
For streams with non-byte
ELEMENT-TYPE
,FILE-POSITION
reports wrong values after the I/O buffer is advanced:? (with-open-file (f "/dev/zero" :direction :input :element-type '(unsigned-byte 32))
(loop for i below 2000
do (read-byte f)
collect (file-position f)))
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54\ 55 56 57 58 59 60 61 62 63 16 17 18 19 20 21 22 23 ...
This happens because element size is not properly accounted for in
input-file-ioblock-advance
. Patch proposal attached.file-position-patch.zip
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: