mikpe@IDA.LiU.SE (Mikael Pettersson) (01/28/91)
There appears to be a bug in xsetfposition() (xlfun2.c).
Suppose the input file contains the characters #\5, #\Space
and #\; . Suppose we've done a (read) from the file, reading
5. Then #\Space will have been read and then pushed back
again by xlungetc(). Now let's rewind the port by doing
a (set-file-position! <the-port> 0 0). Then the next character
read from the port will still be that #\Space instead of the
#\5. Definitely un-cool :-(
The fix is to insert a line:
setsavech(fptr, '\0');
just before the line in xsetfposition() that calls fseek().
/Mike
--
Mikael Pettersson, Dept of Comp & Info Sci, University of Linkoping, Sweden
email: mpe@ida.liu.se or ...!{mcsun,munnari,uunet,unido,...}!sunic!liuida!mpe