fix stream-tell

db4
Doug Coleman 2009-10-03 19:26:59 -05:00
parent aa37a57b9a
commit ed1636a0c0
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ M: fd cancel-operation ( fd -- )
] if ;
M: unix tell-handle ( handle -- n )
fd>> SEEK_SET 0 lseek [ io-error ] [ ] bi ;
fd>> 0 SEEK_CUR lseek [ io-error ] [ ] bi ;
M: unix seek-handle ( n seek-type handle -- )
swap {

View File

@ -130,7 +130,7 @@ HOOK: seek-handle os ( n seek-type handle -- )
M: buffered-port stream-tell ( stream -- n )
[ check-disposed ]
[ handle>> tell-handle ]
[ buffer>> pos>> ] tri + ;
[ [ buffer>> size>> - 0 max ] [ buffer>> pos>> ] bi + ] tri ;
M: input-port stream-seek ( n seek-type stream -- )
[ check-disposed ]