SDL_rwops read/write functions return size_t again

The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.

The functions to read sized datatypes now return SDL_bool so you can detect read errors.

Fixes https://github.com/libsdl-org/SDL/issues/6729
This commit is contained in:
Sam Lantinga
2023-08-06 13:51:03 -07:00
parent c03f5b4b69
commit b903ccf945
20 changed files with 1154 additions and 754 deletions

View File

@@ -2690,3 +2690,63 @@ typedef SDL_cond, SDL_Condition;
- SDL_strtokr
+ SDL_strtok_r
(...)
@@
@@
- SDL_ReadLE16
+ SDL_ReadU16LE
(...)
@@
@@
- SDL_ReadLE32
+ SDL_ReadU32LE
(...)
@@
@@
- SDL_ReadBE32
+ SDL_ReadU32BE
(...)
@@
@@
- SDL_ReadBE16
+ SDL_ReadU16BE
(...)
@@
@@
- SDL_ReadLE64
+ SDL_ReadU64LE
(...)
@@
@@
- SDL_ReadBE64
+ SDL_ReadU64BE
(...)
@@
@@
- SDL_WriteLE16
+ SDL_WriteU16LE
(...)
@@
@@
- SDL_WriteBE16
+ SDL_WriteU16BE
(...)
@@
@@
- SDL_WriteLE32
+ SDL_WriteU32LE
(...)
@@
@@
- SDL_WriteBE32
+ SDL_WriteU32BE
(...)
@@
@@
- SDL_WriteLE64
+ SDL_WriteU64LE
(...)
@@
@@
- SDL_WriteBE64
+ SDL_WriteU64BE
(...)