Skip to content
Snippets Groups Projects
Commit d689646f authored by rtoy's avatar rtoy
Browse files

Fix file-position bug in trac #36. We add an array to keep track of

the octets consumed for each character.  This array is used to figure
out the file position.  Some tests comparing this scheme indicates a
very small slowdown of about 1%, so this seems not to hurt.

Use a cross-compile using the 2010-07 snapshot to build this.  (Same
procedure as used to build the 20b-pre1 release.)

struct.lisp:
o Add new slot OCTET-COUNT to LISP-STREAM to hold the array of octets
  per character.

extfmts.lisp:
o Add OCTETS-TO-STRING-COUNTED, which is like OCTETS-TO-STRING, except
  we need an array in which to store the number of octets consumed for
  each character processed.

fd-stream.lisp:
o Create the octet-count array creating the lisp stream string buffer.
o In FD-STREAM-FILE-POSITION, use the octet count to count the number
  of octets that have been read but not yet returned to the user.

stream.lisp:
o Use OCTETS-TO-STRING-COUNTED instead of OCTETS-TO-STRING so we keep
  track of octet length of each character processed.
parent 224b62bc
No related branches found
No related tags found
No related merge requests found
Loading
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