Simplistic error handling for ANSI read and write
fwrite
and fread
return a short count in case of an error (or when end-of-file is reached while reading). Both _sion_file_write_ansi
and _sion_file_read_ansi
ignore these return values that signal errors and retry the operation until the requested number of bytes has been written. In cases where an error does not solve itself over time, this will result in infinite loops.