mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2025-04-13 07:37:09 +00:00
fseek: do not clear read/write flags for read-only/write-only streams.
This maintains the invariant that these flags stay set to reflect the setting of the stream as read-only or write-only, allowing code elsewhere to behave appropriately based on that.
This commit is contained in:
parent
89b501f259
commit
219e4352a0
11
stdio.asm
11
stdio.asm
@ -1916,10 +1916,13 @@ lb5 move4 offset,spPosition
|
||||
OSSet_Mark sp
|
||||
bcs erEIO
|
||||
|
||||
lb6 ldy #FILE_flag clear the EOF , READ, WRITE flags
|
||||
lda #$FFFF-_IOEOF-_IOREAD-_IOWRT
|
||||
and [stream],Y
|
||||
sta [stream],Y
|
||||
lb6 ldy #FILE_flag clear the EOF flag
|
||||
lda [stream],Y
|
||||
and #$FFFF-_IOEOF
|
||||
bit #_IORW if file is open for reading and writing
|
||||
beq lb6a
|
||||
and #$FFFF-_IOREAD-_IOWRT clear the READ and WRITE flags
|
||||
lb6a sta [stream],Y
|
||||
ldy #FILE_cnt clear the character count
|
||||
lda #0
|
||||
sta [stream],Y
|
||||
|
Loading…
x
Reference in New Issue
Block a user