mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2024-06-10 09:29:29 +00:00
scanf: Do not test for EOF at the beginning of scanf processing.
If the format string is empty or contains only %n conversions, then nothing should be read from the stream, so no error should be indicated even if it is at EOF. If a directive does read from the stream and encounter EOF, that will be handled when the directive is processed. This could cause scanf to pause waiting for input from the console in cases where it should not.
This commit is contained in:
parent
614af65c68
commit
6bc1c3741c
|
@ -6151,11 +6151,6 @@ ps stz ~assignments no assignments yet
|
|||
stz ~scanCount no characters scanned
|
||||
stz ~scanError no scan error so far
|
||||
stz ~eofFound eof was not the first char
|
||||
jsl ~getchar test for eof
|
||||
cmp #EOF
|
||||
bne ps0
|
||||
sta ~eofFound
|
||||
ps0 jsl ~putback
|
||||
|
||||
ps1 lda ~scanError quit if a scan error has occurred
|
||||
bne rm1
|
||||
|
|
Loading…
Reference in New Issue
Block a user