Do not set read/write error indicator if ftell cannot get the file mark.

This is not really an IO operation on the file, and accordingly the C standards do not describe the error indicator as being set here. In particular, you cannot get the mark for a character device, but that is expected behavior, not really an error condition.

errno is still set, indicating that the ftell operation failed.
This commit is contained in:
Stephen Heumann 2022-07-02 22:09:56 -05:00
parent 3eb8a9cb55
commit 2d6ca8a7b2
1 changed files with 2 additions and 2 deletions

View File

@ -2008,8 +2008,8 @@ lb0 ldy #FILE_file get the file's mark
sta gmRefNum
OSGet_Mark gm
bcc lb1
ph4 <stream
jsr ~ioerror
lda #EIO
sta >errno
bra rts
lb1 move4 gmPosition,pos set the position